Skip to content

Commit a6cd666

Browse files
committed
feat(frontier): remove deprecated fields and reserve field ids
1 parent aed9df8 commit a6cd666

File tree

1 file changed

+26
-199
lines changed

1 file changed

+26
-199
lines changed

raystack/frontier/v1beta1/frontier.proto

Lines changed: 26 additions & 199 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,7 @@ message UpdateBillingAccountRequest {
449449
// ID of the billing account to update
450450
string id = 1 [(buf.validate.field).string.uuid = true];
451451

452-
string org_id = 2 [
453-
deprecated = true,
454-
(buf.validate.field).string.min_len = 1
455-
]; // DEPRECATED: org_id will be inferred from billing account id
452+
reserved 2;
456453

457454
// Billing account to update.
458455
BillingAccountRequestBody body = 3;
@@ -467,10 +464,7 @@ message RegisterBillingAccountRequest {
467464
// ID of the billing account to register
468465
string id = 1 [(buf.validate.field).string.uuid = true];
469466

470-
string org_id = 2 [
471-
deprecated = true,
472-
(buf.validate.field).string.min_len = 1
473-
]; // DEPRECATED: org_id will be inferred from billing account id
467+
reserved 2;
474468
}
475469

476470
message RegisterBillingAccountResponse {}
@@ -491,32 +485,23 @@ message DeleteBillingAccountRequest {
491485
// ID of the billing account to delete
492486
string id = 1 [(buf.validate.field).string.uuid = true];
493487

494-
string org_id = 2 [
495-
deprecated = true,
496-
(buf.validate.field).string.min_len = 1
497-
]; // DEPRECATED: org_id will be inferred from billing account id
488+
reserved 2;
498489
}
499490

500491
message DeleteBillingAccountResponse {}
501492

502493
message EnableBillingAccountRequest {
503494
// ID of the billing account to enable
504495
string id = 1 [(buf.validate.field).string.uuid = true];
505-
string org_id = 2 [
506-
deprecated = true,
507-
(buf.validate.field).string.min_len = 1
508-
]; // DEPRECATED: org_id will be inferred from billing account id
496+
reserved 2;
509497
}
510498

511499
message EnableBillingAccountResponse {}
512500

513501
message DisableBillingAccountRequest {
514502
// ID of the billing account to disable
515503
string id = 1 [(buf.validate.field).string.uuid = true];
516-
string org_id = 2 [
517-
deprecated = true,
518-
(buf.validate.field).string.min_len = 1
519-
]; // DEPRECATED: org_id will be inferred from billing account id
504+
reserved 2;
520505
}
521506

522507
message DisableBillingAccountResponse {}
@@ -525,10 +510,7 @@ message GetBillingBalanceRequest {
525510
// ID of the billing account to get the balance for
526511
string id = 1 [(buf.validate.field).string.uuid = true];
527512

528-
string org_id = 2 [
529-
deprecated = true,
530-
(buf.validate.field).string.min_len = 1
531-
]; // DEPRECATED: org_id will be inferred from billing account id
513+
reserved 2;
532514
}
533515

534516
message GetBillingBalanceResponse {
@@ -537,16 +519,7 @@ message GetBillingBalanceResponse {
537519
}
538520

539521
message HasTrialedRequest {
540-
// ID of the billing account to check
541-
string id = 1 [
542-
deprecated = true,
543-
(buf.validate.field).string.uuid = true
544-
]; // DEPRECATED: billing_id will be inferred from plan_id
545-
546-
string org_id = 2 [
547-
deprecated = true,
548-
(buf.validate.field).string.min_len = 1
549-
]; // DEPRECATED: org_id will be inferred from plan_id
522+
reserved 1, 2;
550523

551524
// ID of the plan to check
552525
string plan_id = 3 [(buf.validate.field).string.min_len = 1];
@@ -559,17 +532,7 @@ message HasTrialedResponse {
559532

560533
message CreateBillingUsageRequest {
561534
string org_id = 1;
562-
// DEPRECATED: billing_id will be inferred from org_id
563-
string billing_id = 2 [
564-
deprecated = true,
565-
(buf.validate.field) = {
566-
ignore: IGNORE_IF_ZERO_VALUE
567-
string: {uuid: true}
568-
}
569-
];
570-
571-
// DEPRECATED
572-
string project_id = 4 [deprecated = true];
535+
reserved 2, 4;
573536

574537
// Usage to create
575538
repeated Usage usages = 3;
@@ -579,14 +542,7 @@ message CreateBillingUsageResponse {}
579542

580543
message ListBillingTransactionsRequest {
581544
string org_id = 1 [(buf.validate.field).string.min_len = 3];
582-
// DEPRECATED: billing_id will be inferred from org_id
583-
string billing_id = 2 [
584-
deprecated = true,
585-
(buf.validate.field) = {
586-
ignore: IGNORE_IF_ZERO_VALUE
587-
string: {uuid: true}
588-
}
589-
];
545+
reserved 2;
590546

591547
google.protobuf.Timestamp since = 3 [deprecated = true];
592548
google.protobuf.Timestamp start_range = 4;
@@ -602,14 +558,7 @@ message ListBillingTransactionsResponse {
602558

603559
message TotalDebitedTransactionsRequest {
604560
string org_id = 1 [(buf.validate.field).string.min_len = 3];
605-
// DEPRECATED: billing_id will be inferred from org_id
606-
string billing_id = 2 [
607-
deprecated = true,
608-
(buf.validate.field) = {
609-
ignore: IGNORE_IF_ZERO_VALUE
610-
string: {uuid: true}
611-
}
612-
];
561+
reserved 2;
613562
}
614563

615564
message TotalDebitedTransactionsResponse {
@@ -618,23 +567,8 @@ message TotalDebitedTransactionsResponse {
618567
}
619568

620569
message GetSubscriptionRequest {
621-
// DEPRECATED: org_id will be inferred from subscription id
622-
string org_id = 1 [
623-
deprecated = true,
624-
(buf.validate.field) = {
625-
ignore: IGNORE_IF_ZERO_VALUE
626-
string: {min_len: 3}
627-
}
628-
];
629-
// DEPRECATED: billing_id will be inferred from subscription id
630-
// ID of the billing account to get the subscription for
631-
string billing_id = 2 [
632-
deprecated = true,
633-
(buf.validate.field) = {
634-
ignore: IGNORE_IF_ZERO_VALUE
635-
string: {uuid: true}
636-
}
637-
];
570+
reserved 1, 2;
571+
638572
// ID of the subscription to get
639573
string id = 3 [(buf.validate.field).string.min_len = 1];
640574

@@ -647,15 +581,7 @@ message GetSubscriptionResponse {
647581

648582
message ListSubscriptionsRequest {
649583
string org_id = 1 [(buf.validate.field).string.min_len = 3];
650-
// DEPRECATED: billing_id will be inferred from org_id
651-
// ID of the billing account to list subscriptions for
652-
string billing_id = 2 [
653-
deprecated = true,
654-
(buf.validate.field) = {
655-
ignore: IGNORE_IF_ZERO_VALUE
656-
string: {uuid: true}
657-
}
658-
];
584+
reserved 2;
659585

660586
// Filter subscriptions by state
661587
string state = 3;
@@ -670,23 +596,8 @@ message ListSubscriptionsResponse {
670596
}
671597

672598
message UpdateSubscriptionRequest {
673-
// DEPRECATED: org_id will be inferred from subscription id
674-
string org_id = 1 [
675-
deprecated = true,
676-
(buf.validate.field) = {
677-
ignore: IGNORE_IF_ZERO_VALUE
678-
string: {min_len: 3}
679-
}
680-
];
681-
// DEPRECATED: billing_id will be inferred from subscription id
682-
// ID of the billing account to update the subscription for
683-
string billing_id = 2 [
684-
deprecated = true,
685-
(buf.validate.field) = {
686-
ignore: IGNORE_IF_ZERO_VALUE
687-
string: {uuid: true}
688-
}
689-
];
599+
reserved 1, 2;
600+
690601
// ID of the subscription to update
691602
string id = 3 [(buf.validate.field).string.min_len = 1];
692603

@@ -699,23 +610,8 @@ message UpdateSubscriptionResponse {
699610
}
700611

701612
message ChangeSubscriptionRequest {
702-
// DEPRECATED: org_id will be inferred from subscription id
703-
string org_id = 1 [
704-
deprecated = true,
705-
(buf.validate.field) = {
706-
ignore: IGNORE_IF_ZERO_VALUE
707-
string: {min_len: 3}
708-
}
709-
];
710-
// DEPRECATED: billing_id will be inferred from subscription id
711-
// ID of the billing account to update the subscription for
712-
string billing_id = 2 [
713-
deprecated = true,
714-
(buf.validate.field) = {
715-
ignore: IGNORE_IF_ZERO_VALUE
716-
string: {uuid: true}
717-
}
718-
];
613+
reserved 1, 2;
614+
719615
// ID of the subscription to update
720616
string id = 3 [(buf.validate.field).string.min_len = 1];
721617

@@ -750,23 +646,8 @@ message ChangeSubscriptionResponse {
750646
}
751647

752648
message CancelSubscriptionRequest {
753-
// DEPRECATED: org_id will be inferred from subscription id
754-
string org_id = 1 [
755-
deprecated = true,
756-
(buf.validate.field) = {
757-
ignore: IGNORE_IF_ZERO_VALUE
758-
string: {min_len: 3}
759-
}
760-
];
761-
// DEPRECATED: billing_id will be inferred from subscription id
762-
// ID of the billing account to update the subscription for
763-
string billing_id = 2 [
764-
deprecated = true,
765-
(buf.validate.field) = {
766-
ignore: IGNORE_IF_ZERO_VALUE
767-
string: {uuid: true}
768-
}
769-
];
649+
reserved 1, 2;
650+
770651
// ID of the subscription to cancel
771652
string id = 3 [(buf.validate.field).string.min_len = 1];
772653

@@ -784,17 +665,7 @@ message ListPlansResponse {
784665

785666
message CheckFeatureEntitlementRequest {
786667
string org_id = 1;
787-
// DEPRECATED: billing_id will be inferred from org_id
788-
string billing_id = 2 [
789-
deprecated = true,
790-
(buf.validate.field) = {
791-
ignore: IGNORE_IF_ZERO_VALUE
792-
string: {uuid: true}
793-
}
794-
];
795-
796-
// DEPRECATED
797-
string project_id = 4 [deprecated = true];
668+
reserved 2, 4;
798669

799670
// feature or product name
800671
string feature = 3 [(buf.validate.field).string.min_len = 1];
@@ -815,15 +686,7 @@ message CheckCreditEntitlementResponse {
815686

816687
message CreateCheckoutRequest {
817688
string org_id = 1 [(buf.validate.field).string.min_len = 3];
818-
// DEPRECATED: billing_id will be inferred from org_id
819-
// ID of the billing account to update the subscription for
820-
string billing_id = 2 [
821-
deprecated = true,
822-
(buf.validate.field) = {
823-
ignore: IGNORE_IF_ZERO_VALUE
824-
string: {uuid: true}
825-
}
826-
];
689+
reserved 2;
827690

828691
string success_url = 3;
829692
string cancel_url = 4;
@@ -843,15 +706,7 @@ message CreateCheckoutResponse {
843706

844707
message ListCheckoutsRequest {
845708
string org_id = 1 [(buf.validate.field).string.min_len = 3];
846-
// DEPRECATED: billing_id will be inferred from org_id
847-
// ID of the billing account to get the subscriptions for
848-
string billing_id = 2 [
849-
deprecated = true,
850-
(buf.validate.field) = {
851-
ignore: IGNORE_IF_ZERO_VALUE
852-
string: {uuid: true}
853-
}
854-
];
709+
reserved 2;
855710
}
856711

857712
message ListCheckoutsResponse {
@@ -860,22 +715,8 @@ message ListCheckoutsResponse {
860715
}
861716

862717
message GetCheckoutRequest {
863-
// DEPRECATED: org_id is not needed, checkout can be fetched by id alone
864-
string org_id = 1 [
865-
deprecated = true,
866-
(buf.validate.field) = {
867-
ignore: IGNORE_IF_ZERO_VALUE
868-
string: {min_len: 3}
869-
}
870-
];
871-
// DEPRECATED: billing_id is not needed, checkout can be fetched by id alone
872-
string billing_id = 2 [
873-
deprecated = true,
874-
(buf.validate.field) = {
875-
ignore: IGNORE_IF_ZERO_VALUE
876-
string: {uuid: true}
877-
}
878-
];
718+
reserved 1, 2;
719+
879720
// ID of the checkout to get
880721
string id = 3 [(buf.validate.field).string.min_len = 1];
881722
}
@@ -1052,14 +893,7 @@ message UpdatePlanResponse {
1052893

1053894
message ListInvoicesRequest {
1054895
string org_id = 1 [(buf.validate.field).string.min_len = 3];
1055-
// DEPRECATED: billing_id will be inferred from org_id
1056-
string billing_id = 2 [
1057-
deprecated = true,
1058-
(buf.validate.field) = {
1059-
ignore: IGNORE_IF_ZERO_VALUE
1060-
string: {uuid: true}
1061-
}
1062-
];
896+
reserved 2;
1063897

1064898
bool nonzero_amount_only = 3;
1065899

@@ -1073,14 +907,7 @@ message ListInvoicesResponse {
1073907

1074908
message GetUpcomingInvoiceRequest {
1075909
string org_id = 1 [(buf.validate.field).string.min_len = 3];
1076-
// DEPRECATED: billing_id will be inferred from org_id
1077-
string billing_id = 2 [
1078-
deprecated = true,
1079-
(buf.validate.field) = {
1080-
ignore: IGNORE_IF_ZERO_VALUE
1081-
string: {uuid: true}
1082-
}
1083-
];
910+
reserved 2;
1084911
}
1085912

1086913
message GetUpcomingInvoiceResponse {

0 commit comments

Comments
 (0)