Skip to content

Commit dfb40e5

Browse files
feat: add rpc for searching all invoices (#410)
* add rpc for searching all invoices * update proto
1 parent 463459d commit dfb40e5

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

raystack/frontier/v1beta1/admin.proto

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,17 @@ service AdminService {
741741
};
742742
}
743743

744+
rpc SearchInvoices(SearchInvoicesRequest) returns (SearchInvoicesResponse) {
745+
option (google.api.http) = {
746+
post: "/v1beta1/admin/invoices/search",
747+
body: "query"
748+
};
749+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
750+
tags: "invoice";
751+
summary: "Search invoices across all organizations";
752+
};
753+
}
754+
744755
}
745756

746757
message ListAllUsersRequest {
@@ -1597,3 +1608,25 @@ message AdminCreateOrganizationRequest {
15971608
message AdminCreateOrganizationResponse {
15981609
Organization organization = 1;
15991610
}
1611+
1612+
message SearchInvoicesRequest {
1613+
RQLRequest query = 1;
1614+
}
1615+
1616+
message SearchInvoicesResponse {
1617+
message Invoice {
1618+
string id = 1;
1619+
int64 amount = 2;
1620+
string currency = 3;
1621+
string state = 4;
1622+
string invoice_link = 5;
1623+
google.protobuf.Timestamp created_at = 6;
1624+
string org_id = 7;
1625+
string org_name = 8;
1626+
string org_title = 9;
1627+
}
1628+
1629+
repeated Invoice invoices = 1;
1630+
RQLQueryPaginationResponse pagination = 2;
1631+
RQLQueryGroupResponse group = 3;
1632+
}

0 commit comments

Comments
 (0)