Skip to content

Commit

Permalink
feat(subs): implement subscription internals
Browse files Browse the repository at this point in the history
feat: subscription creation wireframing

refactor: move subscriptions out of productcatalog

refactor: fresh start

feat(subs): define interfaces and subpackages

feat(subs): write individual patches

feat: implement patch serialization

feat: db structure for patches

fix(subs): date use in patches

fix: date use in subscription patches

chore: uncomment methods

fix: fix rebase issues

feat(subs): subscription creation and patch saving

feat: add entitlement annotations

feat: write patch saving

feat: subscriptionView

feat: write db schema for patches

feat(subs): write entity mappings for repository

feat(subs): implement and test create and read

feat: implement price

test: write command and query builders

test: subscription creation without customizations

test(subs): test creation with customizations

refactor(sub): marry command and query

feat(subs): write syncing

test: test entity syncing

feat: test editing and fix rebase errors

chore: generate migrations

chore: remove dangling execs

fix: use patch timestamp instead of operation timestamp for validations

chore: remove dead code

fix(lint): fix lint errors

feat: incorporate new price types

chore: undo me

test(subs): service create and view tests

feat(subs): define workflow service

fix(subs): consolidate key and id use when linking things

refactor(test): rewrite tests to use ent schema upserts

feat(subscription): guard managed entitlements

feat(subscription): write first version of workflow service

fix(subs): rebase errors

feat(subs): add statemation to control transitions

feat(subs): cancelation and continuing

refactor(subs): calculate item cadence from itemSpec

refactor(subs): remove CadencedModel from SubscriptionItem and make its cadence relative to phase

feat(subs): implement correct editing of current phase

refactor(subs): use custom RateCard type

feat(subs): add validations for Spec and View

feat(subs): add back CadencedModel to SubscriptionItem

chore: generate migrations

fix(e2e): fix e2e tests to use non-ulid featureKey

refactor(subs): normalize RateCard

refactor(subs): regenerate migrations
  • Loading branch information
GAlexIHU committed Dec 2, 2024
1 parent fb3848a commit 212a44a
Show file tree
Hide file tree
Showing 139 changed files with 30,466 additions and 100 deletions.
2 changes: 1 addition & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ func TestCredit(t *testing.T) {
const waitTime = time.Second * 30

t.Run("Create Feature", func(t *testing.T) {
randKey := strings.ToLower(ulid.Make().String())
randKey := fmt.Sprintf("credit_test_feature_%d", time.Now().Unix())
resp, err := client.CreateFeatureWithResponse(context.Background(), api.CreateFeatureJSONRequestBody{
Name: "Credit Test Feature",
MeterSlug: convert.ToPointer("credit_test_meter"),
Expand Down
768 changes: 764 additions & 4 deletions openmeter/ent/db/client.go

Large diffs are not rendered by default.

18 changes: 17 additions & 1 deletion openmeter/ent/db/customer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions openmeter/ent/db/customer/customer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions openmeter/ent/db/customer/where.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions openmeter/ent/db/customer_create.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 75 additions & 1 deletion openmeter/ent/db/customer_query.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 212a44a

Please sign in to comment.