diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index d35c771d..43b32647 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -1 +1,2 @@ eastus +sourced diff --git a/gen/go/qdrant/cloud/billing/v1/billing.pb.go b/gen/go/qdrant/cloud/billing/v1/billing.pb.go index 5fa43d87..90810e8e 100644 --- a/gen/go/qdrant/cloud/billing/v1/billing.pb.go +++ b/gen/go/qdrant/cloud/billing/v1/billing.pb.go @@ -740,6 +740,182 @@ func (x *ListCreditContractsResponse) GetItems() []*CreditContract { return nil } +// ListCreditContractConsumptionsRequest is the request for the ListCreditContractConsumptions function +type ListCreditContractConsumptionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the account (in GUID format). + // This is a required field. + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListCreditContractConsumptionsRequest) Reset() { + *x = ListCreditContractConsumptionsRequest{} + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListCreditContractConsumptionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCreditContractConsumptionsRequest) ProtoMessage() {} + +func (x *ListCreditContractConsumptionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCreditContractConsumptionsRequest.ProtoReflect.Descriptor instead. +func (*ListCreditContractConsumptionsRequest) Descriptor() ([]byte, []int) { + return file_qdrant_cloud_billing_v1_billing_proto_rawDescGZIP(), []int{10} +} + +func (x *ListCreditContractConsumptionsRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +// ListCreditContractConsumptionsResponse is the response from the ListCreditContractConsumptions function +type ListCreditContractConsumptionsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The list of credit contract consumptions. + Items []*CreditContractConsumption `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListCreditContractConsumptionsResponse) Reset() { + *x = ListCreditContractConsumptionsResponse{} + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListCreditContractConsumptionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCreditContractConsumptionsResponse) ProtoMessage() {} + +func (x *ListCreditContractConsumptionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCreditContractConsumptionsResponse.ProtoReflect.Descriptor instead. +func (*ListCreditContractConsumptionsResponse) Descriptor() ([]byte, []int) { + return file_qdrant_cloud_billing_v1_billing_proto_rawDescGZIP(), []int{11} +} + +func (x *ListCreditContractConsumptionsResponse) GetItems() []*CreditContractConsumption { + if x != nil { + return x.Items + } + return nil +} + +// CreditContractConsumption represents the consumption data for a credit contract. +type CreditContractConsumption struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifier of the credit contract this consumption belongs to. + CreditContractId string `protobuf:"bytes,1,opt,name=credit_contract_id,json=creditContractId,proto3" json:"credit_contract_id,omitempty"` + // Total contract value. + TotalAmount float64 `protobuf:"fixed64,2,opt,name=total_amount,json=totalAmount,proto3" json:"total_amount,omitempty"` + // Amount consumed so far. + UsedAmount float64 `protobuf:"fixed64,3,opt,name=used_amount,json=usedAmount,proto3" json:"used_amount,omitempty"` + // Amount remaining. + RemainingAmount float64 `protobuf:"fixed64,4,opt,name=remaining_amount,json=remainingAmount,proto3" json:"remaining_amount,omitempty"` + // The currency of the amounts. + // Must be a 3-letter ISO 4217 currency code (e.g., "USD"). + Currency string `protobuf:"bytes,5,opt,name=currency,proto3" json:"currency,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreditContractConsumption) Reset() { + *x = CreditContractConsumption{} + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreditContractConsumption) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreditContractConsumption) ProtoMessage() {} + +func (x *CreditContractConsumption) ProtoReflect() protoreflect.Message { + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreditContractConsumption.ProtoReflect.Descriptor instead. +func (*CreditContractConsumption) Descriptor() ([]byte, []int) { + return file_qdrant_cloud_billing_v1_billing_proto_rawDescGZIP(), []int{12} +} + +func (x *CreditContractConsumption) GetCreditContractId() string { + if x != nil { + return x.CreditContractId + } + return "" +} + +func (x *CreditContractConsumption) GetTotalAmount() float64 { + if x != nil { + return x.TotalAmount + } + return 0 +} + +func (x *CreditContractConsumption) GetUsedAmount() float64 { + if x != nil { + return x.UsedAmount + } + return 0 +} + +func (x *CreditContractConsumption) GetRemainingAmount() float64 { + if x != nil { + return x.RemainingAmount + } + return 0 +} + +func (x *CreditContractConsumption) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + // CreditContract represents a prepaid credit contract for an organization. type CreditContract struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -766,7 +942,7 @@ type CreditContract struct { func (x *CreditContract) Reset() { *x = CreditContract{} - mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[10] + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -778,7 +954,7 @@ func (x *CreditContract) String() string { func (*CreditContract) ProtoMessage() {} func (x *CreditContract) ProtoReflect() protoreflect.Message { - mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[10] + mi := &file_qdrant_cloud_billing_v1_billing_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -791,7 +967,7 @@ func (x *CreditContract) ProtoReflect() protoreflect.Message { // Deprecated: Use CreditContract.ProtoReflect.Descriptor instead. func (*CreditContract) Descriptor() ([]byte, []int) { - return file_qdrant_cloud_billing_v1_billing_proto_rawDescGZIP(), []int{10} + return file_qdrant_cloud_billing_v1_billing_proto_rawDescGZIP(), []int{13} } func (x *CreditContract) GetId() string { @@ -899,7 +1075,20 @@ const file_qdrant_cloud_billing_v1_billing_proto_rawDesc = "" + "\n" + "account_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\\\n" + "\x1bListCreditContractsResponse\x12=\n" + - "\x05items\x18\x01 \x03(\v2'.qdrant.cloud.billing.v1.CreditContractR\x05items\"\xcd\x03\n" + + "\x05items\x18\x01 \x03(\v2'.qdrant.cloud.billing.v1.CreditContractR\x05items\"P\n" + + "%ListCreditContractConsumptionsRequest\x12'\n" + + "\n" + + "account_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"r\n" + + "&ListCreditContractConsumptionsResponse\x12H\n" + + "\x05items\x18\x01 \x03(\v22.qdrant.cloud.billing.v1.CreditContractConsumptionR\x05items\"\xa1\x02\n" + + "\x19CreditContractConsumption\x126\n" + + "\x12credit_contract_id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x10creditContractId\x121\n" + + "\ftotal_amount\x18\x02 \x01(\x01B\x0e\xbaH\v\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\vtotalAmount\x12/\n" + + "\vused_amount\x18\x03 \x01(\x01B\x0e\xbaH\v\x12\t)\x00\x00\x00\x00\x00\x00\x00\x00R\n" + + "usedAmount\x129\n" + + "\x10remaining_amount\x18\x04 \x01(\x01B\x0e\xbaH\v\x12\t)\x00\x00\x00\x00\x00\x00\x00\x00R\x0fremainingAmount\x12-\n" + + "\bcurrency\x18\x05 \x01(\tB\x11\xbaH\x0er\f2\n" + + "^[A-Z]{3}$R\bcurrency\"\xcd\x03\n" + "\x0eCreditContract\x12\x18\n" + "\x02id\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12'\n" + "\n" + @@ -926,11 +1115,12 @@ const file_qdrant_cloud_billing_v1_billing_proto_rawDesc = "" + "\x13INVOICE_STATUS_OPEN\x10\x02\x12\x17\n" + "\x13INVOICE_STATUS_VOID\x10\x03\x12\x17\n" + "\x13INVOICE_STATUS_PAID\x10\x04\x12 \n" + - "\x1cINVOICE_STATUS_UNCOLLECTIBLE\x10\x052\xff\x04\n" + + "\x1cINVOICE_STATUS_UNCOLLECTIBLE\x10\x052\x8b\a\n" + "\x0eBillingService\x12\xbf\x01\n" + "\fListInvoices\x12,.qdrant.cloud.billing.v1.ListInvoicesRequest\x1a-.qdrant.cloud.billing.v1.ListInvoicesResponse\"R\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x020\x12./api/billing/v1/accounts/{account_id}/invoices\x12\xc3\x01\n" + "\rListDiscounts\x12-.qdrant.cloud.billing.v1.ListDiscountsRequest\x1a..qdrant.cloud.billing.v1.ListDiscountsResponse\"S\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x021\x12//api/billing/v1/accounts/{account_id}/discounts\x12\xdc\x01\n" + - "\x13ListCreditContracts\x123.qdrant.cloud.billing.v1.ListCreditContractsRequest\x1a4.qdrant.cloud.billing.v1.ListCreditContractsResponse\"Z\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x028\x126/api/billing/v1/accounts/{account_id}/credit-contracts\x1a\x06µ\x18\x02\b\x01B\xfe\x01\n" + + "\x13ListCreditContracts\x123.qdrant.cloud.billing.v1.ListCreditContractsRequest\x1a4.qdrant.cloud.billing.v1.ListCreditContractsResponse\"Z\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x028\x126/api/billing/v1/accounts/{account_id}/credit-contracts\x12\x89\x02\n" + + "\x1eListCreditContractConsumptions\x12>.qdrant.cloud.billing.v1.ListCreditContractConsumptionsRequest\x1a?.qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse\"f\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02D\x12B/api/billing/v1/accounts/{account_id}/credit-contract-consumptions\x1a\x06µ\x18\x02\b\x01B\xfe\x01\n" + "\x1bcom.qdrant.cloud.billing.v1B\fBillingProtoP\x01ZRgithub.com/qdrant/qdrant-cloud-public-api/gen/go/qdrant/cloud/billing/v1;billingv1\xa2\x02\x03QCB\xaa\x02\x17Qdrant.Cloud.Billing.V1\xca\x02\x17Qdrant\\Cloud\\Billing\\V1\xe2\x02#Qdrant\\Cloud\\Billing\\V1\\GPBMetadata\xea\x02\x1aQdrant::Cloud::Billing::V1b\x06proto3" var ( @@ -946,47 +1136,53 @@ func file_qdrant_cloud_billing_v1_billing_proto_rawDescGZIP() []byte { } var file_qdrant_cloud_billing_v1_billing_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_qdrant_cloud_billing_v1_billing_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_qdrant_cloud_billing_v1_billing_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_qdrant_cloud_billing_v1_billing_proto_goTypes = []any{ - (BillingFrequency)(0), // 0: qdrant.cloud.billing.v1.BillingFrequency - (InvoiceStatus)(0), // 1: qdrant.cloud.billing.v1.InvoiceStatus - (*ListInvoicesRequest)(nil), // 2: qdrant.cloud.billing.v1.ListInvoicesRequest - (*ListInvoicesResponse)(nil), // 3: qdrant.cloud.billing.v1.ListInvoicesResponse - (*ListDiscountsRequest)(nil), // 4: qdrant.cloud.billing.v1.ListDiscountsRequest - (*ListDiscountsResponse)(nil), // 5: qdrant.cloud.billing.v1.ListDiscountsResponse - (*Invoice)(nil), // 6: qdrant.cloud.billing.v1.Invoice - (*Discount)(nil), // 7: qdrant.cloud.billing.v1.Discount - (*DiscountPercentage)(nil), // 8: qdrant.cloud.billing.v1.DiscountPercentage - (*DiscountFixed)(nil), // 9: qdrant.cloud.billing.v1.DiscountFixed - (*ListCreditContractsRequest)(nil), // 10: qdrant.cloud.billing.v1.ListCreditContractsRequest - (*ListCreditContractsResponse)(nil), // 11: qdrant.cloud.billing.v1.ListCreditContractsResponse - (*CreditContract)(nil), // 12: qdrant.cloud.billing.v1.CreditContract - (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp + (BillingFrequency)(0), // 0: qdrant.cloud.billing.v1.BillingFrequency + (InvoiceStatus)(0), // 1: qdrant.cloud.billing.v1.InvoiceStatus + (*ListInvoicesRequest)(nil), // 2: qdrant.cloud.billing.v1.ListInvoicesRequest + (*ListInvoicesResponse)(nil), // 3: qdrant.cloud.billing.v1.ListInvoicesResponse + (*ListDiscountsRequest)(nil), // 4: qdrant.cloud.billing.v1.ListDiscountsRequest + (*ListDiscountsResponse)(nil), // 5: qdrant.cloud.billing.v1.ListDiscountsResponse + (*Invoice)(nil), // 6: qdrant.cloud.billing.v1.Invoice + (*Discount)(nil), // 7: qdrant.cloud.billing.v1.Discount + (*DiscountPercentage)(nil), // 8: qdrant.cloud.billing.v1.DiscountPercentage + (*DiscountFixed)(nil), // 9: qdrant.cloud.billing.v1.DiscountFixed + (*ListCreditContractsRequest)(nil), // 10: qdrant.cloud.billing.v1.ListCreditContractsRequest + (*ListCreditContractsResponse)(nil), // 11: qdrant.cloud.billing.v1.ListCreditContractsResponse + (*ListCreditContractConsumptionsRequest)(nil), // 12: qdrant.cloud.billing.v1.ListCreditContractConsumptionsRequest + (*ListCreditContractConsumptionsResponse)(nil), // 13: qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse + (*CreditContractConsumption)(nil), // 14: qdrant.cloud.billing.v1.CreditContractConsumption + (*CreditContract)(nil), // 15: qdrant.cloud.billing.v1.CreditContract + (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp } var file_qdrant_cloud_billing_v1_billing_proto_depIdxs = []int32{ 6, // 0: qdrant.cloud.billing.v1.ListInvoicesResponse.items:type_name -> qdrant.cloud.billing.v1.Invoice 7, // 1: qdrant.cloud.billing.v1.ListDiscountsResponse.items:type_name -> qdrant.cloud.billing.v1.Discount - 13, // 2: qdrant.cloud.billing.v1.Invoice.created_at:type_name -> google.protobuf.Timestamp + 16, // 2: qdrant.cloud.billing.v1.Invoice.created_at:type_name -> google.protobuf.Timestamp 1, // 3: qdrant.cloud.billing.v1.Invoice.status:type_name -> qdrant.cloud.billing.v1.InvoiceStatus 8, // 4: qdrant.cloud.billing.v1.Discount.percentage:type_name -> qdrant.cloud.billing.v1.DiscountPercentage 9, // 5: qdrant.cloud.billing.v1.Discount.fixed:type_name -> qdrant.cloud.billing.v1.DiscountFixed - 13, // 6: qdrant.cloud.billing.v1.Discount.valid_from:type_name -> google.protobuf.Timestamp - 13, // 7: qdrant.cloud.billing.v1.Discount.valid_until:type_name -> google.protobuf.Timestamp - 12, // 8: qdrant.cloud.billing.v1.ListCreditContractsResponse.items:type_name -> qdrant.cloud.billing.v1.CreditContract - 0, // 9: qdrant.cloud.billing.v1.CreditContract.billing_frequency:type_name -> qdrant.cloud.billing.v1.BillingFrequency - 13, // 10: qdrant.cloud.billing.v1.CreditContract.active_from:type_name -> google.protobuf.Timestamp - 13, // 11: qdrant.cloud.billing.v1.CreditContract.active_to:type_name -> google.protobuf.Timestamp - 2, // 12: qdrant.cloud.billing.v1.BillingService.ListInvoices:input_type -> qdrant.cloud.billing.v1.ListInvoicesRequest - 4, // 13: qdrant.cloud.billing.v1.BillingService.ListDiscounts:input_type -> qdrant.cloud.billing.v1.ListDiscountsRequest - 10, // 14: qdrant.cloud.billing.v1.BillingService.ListCreditContracts:input_type -> qdrant.cloud.billing.v1.ListCreditContractsRequest - 3, // 15: qdrant.cloud.billing.v1.BillingService.ListInvoices:output_type -> qdrant.cloud.billing.v1.ListInvoicesResponse - 5, // 16: qdrant.cloud.billing.v1.BillingService.ListDiscounts:output_type -> qdrant.cloud.billing.v1.ListDiscountsResponse - 11, // 17: qdrant.cloud.billing.v1.BillingService.ListCreditContracts:output_type -> qdrant.cloud.billing.v1.ListCreditContractsResponse - 15, // [15:18] is the sub-list for method output_type - 12, // [12:15] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 16, // 6: qdrant.cloud.billing.v1.Discount.valid_from:type_name -> google.protobuf.Timestamp + 16, // 7: qdrant.cloud.billing.v1.Discount.valid_until:type_name -> google.protobuf.Timestamp + 15, // 8: qdrant.cloud.billing.v1.ListCreditContractsResponse.items:type_name -> qdrant.cloud.billing.v1.CreditContract + 14, // 9: qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse.items:type_name -> qdrant.cloud.billing.v1.CreditContractConsumption + 0, // 10: qdrant.cloud.billing.v1.CreditContract.billing_frequency:type_name -> qdrant.cloud.billing.v1.BillingFrequency + 16, // 11: qdrant.cloud.billing.v1.CreditContract.active_from:type_name -> google.protobuf.Timestamp + 16, // 12: qdrant.cloud.billing.v1.CreditContract.active_to:type_name -> google.protobuf.Timestamp + 2, // 13: qdrant.cloud.billing.v1.BillingService.ListInvoices:input_type -> qdrant.cloud.billing.v1.ListInvoicesRequest + 4, // 14: qdrant.cloud.billing.v1.BillingService.ListDiscounts:input_type -> qdrant.cloud.billing.v1.ListDiscountsRequest + 10, // 15: qdrant.cloud.billing.v1.BillingService.ListCreditContracts:input_type -> qdrant.cloud.billing.v1.ListCreditContractsRequest + 12, // 16: qdrant.cloud.billing.v1.BillingService.ListCreditContractConsumptions:input_type -> qdrant.cloud.billing.v1.ListCreditContractConsumptionsRequest + 3, // 17: qdrant.cloud.billing.v1.BillingService.ListInvoices:output_type -> qdrant.cloud.billing.v1.ListInvoicesResponse + 5, // 18: qdrant.cloud.billing.v1.BillingService.ListDiscounts:output_type -> qdrant.cloud.billing.v1.ListDiscountsResponse + 11, // 19: qdrant.cloud.billing.v1.BillingService.ListCreditContracts:output_type -> qdrant.cloud.billing.v1.ListCreditContractsResponse + 13, // 20: qdrant.cloud.billing.v1.BillingService.ListCreditContractConsumptions:output_type -> qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse + 17, // [17:21] is the sub-list for method output_type + 13, // [13:17] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_qdrant_cloud_billing_v1_billing_proto_init() } @@ -999,14 +1195,14 @@ func file_qdrant_cloud_billing_v1_billing_proto_init() { (*Discount_Percentage)(nil), (*Discount_Fixed)(nil), } - file_qdrant_cloud_billing_v1_billing_proto_msgTypes[10].OneofWrappers = []any{} + file_qdrant_cloud_billing_v1_billing_proto_msgTypes[13].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_qdrant_cloud_billing_v1_billing_proto_rawDesc), len(file_qdrant_cloud_billing_v1_billing_proto_rawDesc)), NumEnums: 2, - NumMessages: 11, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/go/qdrant/cloud/billing/v1/billing_grpc.pb.go b/gen/go/qdrant/cloud/billing/v1/billing_grpc.pb.go index 365542aa..4b922585 100644 --- a/gen/go/qdrant/cloud/billing/v1/billing_grpc.pb.go +++ b/gen/go/qdrant/cloud/billing/v1/billing_grpc.pb.go @@ -19,9 +19,10 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - BillingService_ListInvoices_FullMethodName = "/qdrant.cloud.billing.v1.BillingService/ListInvoices" - BillingService_ListDiscounts_FullMethodName = "/qdrant.cloud.billing.v1.BillingService/ListDiscounts" - BillingService_ListCreditContracts_FullMethodName = "/qdrant.cloud.billing.v1.BillingService/ListCreditContracts" + BillingService_ListInvoices_FullMethodName = "/qdrant.cloud.billing.v1.BillingService/ListInvoices" + BillingService_ListDiscounts_FullMethodName = "/qdrant.cloud.billing.v1.BillingService/ListDiscounts" + BillingService_ListCreditContracts_FullMethodName = "/qdrant.cloud.billing.v1.BillingService/ListCreditContracts" + BillingService_ListCreditContractConsumptions_FullMethodName = "/qdrant.cloud.billing.v1.BillingService/ListCreditContractConsumptions" ) // BillingServiceClient is the client API for BillingService service. @@ -42,6 +43,11 @@ type BillingServiceClient interface { // Required permissions: // - read:payment_information ListCreditContracts(ctx context.Context, in *ListCreditContractsRequest, opts ...grpc.CallOption) (*ListCreditContractsResponse, error) + // Lists consumption data for all credit contracts for the account identified by the given ID. + // Consumption data includes the total, used, and remaining amounts sourced from Orb. + // Required permissions: + // - read:payment_information + ListCreditContractConsumptions(ctx context.Context, in *ListCreditContractConsumptionsRequest, opts ...grpc.CallOption) (*ListCreditContractConsumptionsResponse, error) } type billingServiceClient struct { @@ -82,6 +88,16 @@ func (c *billingServiceClient) ListCreditContracts(ctx context.Context, in *List return out, nil } +func (c *billingServiceClient) ListCreditContractConsumptions(ctx context.Context, in *ListCreditContractConsumptionsRequest, opts ...grpc.CallOption) (*ListCreditContractConsumptionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListCreditContractConsumptionsResponse) + err := c.cc.Invoke(ctx, BillingService_ListCreditContractConsumptions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // BillingServiceServer is the server API for BillingService service. // All implementations must embed UnimplementedBillingServiceServer // for forward compatibility. @@ -100,6 +116,11 @@ type BillingServiceServer interface { // Required permissions: // - read:payment_information ListCreditContracts(context.Context, *ListCreditContractsRequest) (*ListCreditContractsResponse, error) + // Lists consumption data for all credit contracts for the account identified by the given ID. + // Consumption data includes the total, used, and remaining amounts sourced from Orb. + // Required permissions: + // - read:payment_information + ListCreditContractConsumptions(context.Context, *ListCreditContractConsumptionsRequest) (*ListCreditContractConsumptionsResponse, error) mustEmbedUnimplementedBillingServiceServer() } @@ -119,6 +140,9 @@ func (UnimplementedBillingServiceServer) ListDiscounts(context.Context, *ListDis func (UnimplementedBillingServiceServer) ListCreditContracts(context.Context, *ListCreditContractsRequest) (*ListCreditContractsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListCreditContracts not implemented") } +func (UnimplementedBillingServiceServer) ListCreditContractConsumptions(context.Context, *ListCreditContractConsumptionsRequest) (*ListCreditContractConsumptionsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListCreditContractConsumptions not implemented") +} func (UnimplementedBillingServiceServer) mustEmbedUnimplementedBillingServiceServer() {} func (UnimplementedBillingServiceServer) testEmbeddedByValue() {} @@ -194,6 +218,24 @@ func _BillingService_ListCreditContracts_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } +func _BillingService_ListCreditContractConsumptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListCreditContractConsumptionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BillingServiceServer).ListCreditContractConsumptions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BillingService_ListCreditContractConsumptions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BillingServiceServer).ListCreditContractConsumptions(ctx, req.(*ListCreditContractConsumptionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // BillingService_ServiceDesc is the grpc.ServiceDesc for BillingService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -213,6 +255,10 @@ var BillingService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListCreditContracts", Handler: _BillingService_ListCreditContracts_Handler, }, + { + MethodName: "ListCreditContractConsumptions", + Handler: _BillingService_ListCreditContractConsumptions_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "qdrant/cloud/billing/v1/billing.proto", diff --git a/gen/openapiv2/qdrant/cloud/billing/v1/billing.swagger.json b/gen/openapiv2/qdrant/cloud/billing/v1/billing.swagger.json index df4a166a..5f328fcf 100644 --- a/gen/openapiv2/qdrant/cloud/billing/v1/billing.swagger.json +++ b/gen/openapiv2/qdrant/cloud/billing/v1/billing.swagger.json @@ -16,6 +16,38 @@ "application/json" ], "paths": { + "/api/billing/v1/accounts/{accountId}/credit-contract-consumptions": { + "get": { + "summary": "Lists consumption data for all credit contracts for the account identified by the given ID.\nConsumption data includes the total, used, and remaining amounts sourced from Orb.\nRequired permissions:\n- read:payment_information", + "operationId": "BillingService_ListCreditContractConsumptions", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListCreditContractConsumptionsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "accountId", + "description": "The identifier of the account (in GUID format).\nThis is a required field.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "BillingService" + ] + } + }, "/api/billing/v1/accounts/{accountId}/credit-contracts": { "get": { "summary": "Lists all credit contracts for the account identified by the given ID.\nRequired permissions:\n- read:payment_information", @@ -195,6 +227,35 @@ }, "description": "CreditContract represents a prepaid credit contract for an organization." }, + "v1CreditContractConsumption": { + "type": "object", + "properties": { + "creditContractId": { + "type": "string", + "description": "The identifier of the credit contract this consumption belongs to." + }, + "totalAmount": { + "type": "number", + "format": "double", + "description": "Total contract value." + }, + "usedAmount": { + "type": "number", + "format": "double", + "description": "Amount consumed so far." + }, + "remainingAmount": { + "type": "number", + "format": "double", + "description": "Amount remaining." + }, + "currency": { + "type": "string", + "description": "The currency of the amounts.\nMust be a 3-letter ISO 4217 currency code (e.g., \"USD\")." + } + }, + "description": "CreditContractConsumption represents the consumption data for a credit contract." + }, "v1Discount": { "type": "object", "properties": { @@ -294,6 +355,20 @@ "default": "INVOICE_STATUS_UNSPECIFIED", "description": "The possible status of an invoice.\n\n - INVOICE_STATUS_UNSPECIFIED: Unspecified\n - INVOICE_STATUS_DRAFT: Draft\n - INVOICE_STATUS_OPEN: Open\n - INVOICE_STATUS_VOID: Void\n - INVOICE_STATUS_PAID: Paid\n - INVOICE_STATUS_UNCOLLECTIBLE: Uncollectible" }, + "v1ListCreditContractConsumptionsResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1CreditContractConsumption" + }, + "description": "The list of credit contract consumptions." + } + }, + "title": "ListCreditContractConsumptionsResponse is the response from the ListCreditContractConsumptions function" + }, "v1ListCreditContractsResponse": { "type": "object", "properties": { diff --git a/gen/python/qdrant/cloud/billing/v1/billing_pb2.py b/gen/python/qdrant/cloud/billing/v1/billing_pb2.py index 39fdd03d..eb75dd37 100644 --- a/gen/python/qdrant/cloud/billing/v1/billing_pb2.py +++ b/gen/python/qdrant/cloud/billing/v1/billing_pb2.py @@ -28,7 +28,7 @@ from qdrant.cloud.common.v1 import common_pb2 as qdrant_dot_cloud_dot_common_dot_v1_dot_common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%qdrant/cloud/billing/v1/billing.proto\x12\x17qdrant.cloud.billing.v1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a#qdrant/cloud/common/v1/common.proto\">\n\x13ListInvoicesRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"N\n\x14ListInvoicesResponse\x12\x36\n\x05items\x18\x01 \x03(\x0b\x32 .qdrant.cloud.billing.v1.InvoiceR\x05items\"?\n\x14ListDiscountsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"P\n\x15ListDiscountsResponse\x12\x37\n\x05items\x18\x01 \x03(\x0b\x32!.qdrant.cloud.billing.v1.DiscountR\x05items\"\xc2\x02\n\x07Invoice\x12\x17\n\x02id\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x02id\x12$\n\x06number\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x06number\x88\x01\x01\x12*\n\x0ctotal_amount\x18\x03 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x00R\x0btotalAmount\x12\x41\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\tcreatedAt\x12J\n\x06status\x18\x05 \x01(\x0e\x32&.qdrant.cloud.billing.v1.InvoiceStatusB\n\xbaH\x07\x82\x01\x04\x10\x01 \x00R\x06status\x12&\n\x07pdf_url\x18\x06 \x01(\tB\x08\xbaH\x05r\x03\x88\x01\x01H\x01R\x06pdfUrl\x88\x01\x01\x42\t\n\x07_numberB\n\n\x08_pdf_url\"\xba\x03\n\x08\x44iscount\x12\x1b\n\x04name\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04name\x12M\n\npercentage\x18\x02 \x01(\x0b\x32+.qdrant.cloud.billing.v1.DiscountPercentageH\x00R\npercentage\x12>\n\x05\x66ixed\x18\x03 \x01(\x0b\x32&.qdrant.cloud.billing.v1.DiscountFixedH\x00R\x05\x66ixed\x12\x41\n\nvalid_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\tvalidFrom\x12H\n\x0bvalid_until\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0b\xbaH\x08\xb2\x01\x02@\x00\xc8\x01\x01R\nvalidUntil:f\xbaHc\x1a\x61\n\x15\x64iscount.valid_period\x12$valid_until must be after valid_from\x1a\"this.valid_until > this.valid_fromB\r\n\x04type\x12\x05\xbaH\x02\x08\x01\"C\n\x12\x44iscountPercentage\x12-\n\x05value\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x19\x00\x00\x00\x00\x00\x00Y@)\x00\x00\x00\x00\x00\x00\x00\x00R\x05value\"d\n\rDiscountFixed\x12$\n\x05value\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x05value\x12-\n\x08\x63urrency\x18\x02 \x01(\tB\x11\xbaH\x0er\x0c\x32\n^[A-Z]{3}$R\x08\x63urrency\"E\n\x1aListCreditContractsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\\\n\x1bListCreditContractsResponse\x12=\n\x05items\x18\x01 \x03(\x0b\x32\'.qdrant.cloud.billing.v1.CreditContractR\x05items\"\xcd\x03\n\x0e\x43reditContract\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x31\n\x0ctotal_amount\x18\x03 \x01(\x01\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x0btotalAmount\x12-\n\x08\x63urrency\x18\x04 \x01(\tB\x11\xbaH\x0er\x0c\x32\n^[A-Z]{3}$R\x08\x63urrency\x12\x62\n\x11\x62illing_frequency\x18\x05 \x01(\x0e\x32).qdrant.cloud.billing.v1.BillingFrequencyB\n\xbaH\x07\x82\x01\x04\x10\x01 \x00R\x10\x62illingFrequency\x12\x43\n\x0b\x61\x63tive_from\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\nactiveFrom\x12?\n\tactive_to\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\x08\x61\x63tiveTo\x12\"\n\x05notes\x18\x08 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x05notes\x88\x01\x01\x42\x08\n\x06_notes*\xb6\x01\n\x10\x42illingFrequency\x12!\n\x1d\x42ILLING_FREQUENCY_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x42ILLING_FREQUENCY_MONTHLY\x10\x01\x12\x1f\n\x1b\x42ILLING_FREQUENCY_QUARTERLY\x10\x02\x12!\n\x1d\x42ILLING_FREQUENCY_SEMI_ANNUAL\x10\x03\x12\x1c\n\x18\x42ILLING_FREQUENCY_ANNUAL\x10\x04*\xb6\x01\n\rInvoiceStatus\x12\x1e\n\x1aINVOICE_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14INVOICE_STATUS_DRAFT\x10\x01\x12\x17\n\x13INVOICE_STATUS_OPEN\x10\x02\x12\x17\n\x13INVOICE_STATUS_VOID\x10\x03\x12\x17\n\x13INVOICE_STATUS_PAID\x10\x04\x12 \n\x1cINVOICE_STATUS_UNCOLLECTIBLE\x10\x05\x32\xff\x04\n\x0e\x42illingService\x12\xbf\x01\n\x0cListInvoices\x12,.qdrant.cloud.billing.v1.ListInvoicesRequest\x1a-.qdrant.cloud.billing.v1.ListInvoicesResponse\"R\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x30\x12./api/billing/v1/accounts/{account_id}/invoices\x12\xc3\x01\n\rListDiscounts\x12-.qdrant.cloud.billing.v1.ListDiscountsRequest\x1a..qdrant.cloud.billing.v1.ListDiscountsResponse\"S\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x31\x12//api/billing/v1/accounts/{account_id}/discounts\x12\xdc\x01\n\x13ListCreditContracts\x12\x33.qdrant.cloud.billing.v1.ListCreditContractsRequest\x1a\x34.qdrant.cloud.billing.v1.ListCreditContractsResponse\"Z\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x38\x12\x36/api/billing/v1/accounts/{account_id}/credit-contracts\x1a\x06\xc2\xb5\x18\x02\x08\x01\x42\xfe\x01\n\x1b\x63om.qdrant.cloud.billing.v1B\x0c\x42illingProtoP\x01ZRgithub.com/qdrant/qdrant-cloud-public-api/gen/go/qdrant/cloud/billing/v1;billingv1\xa2\x02\x03QCB\xaa\x02\x17Qdrant.Cloud.Billing.V1\xca\x02\x17Qdrant\\Cloud\\Billing\\V1\xe2\x02#Qdrant\\Cloud\\Billing\\V1\\GPBMetadata\xea\x02\x1aQdrant::Cloud::Billing::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%qdrant/cloud/billing/v1/billing.proto\x12\x17qdrant.cloud.billing.v1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a#qdrant/cloud/common/v1/common.proto\">\n\x13ListInvoicesRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"N\n\x14ListInvoicesResponse\x12\x36\n\x05items\x18\x01 \x03(\x0b\x32 .qdrant.cloud.billing.v1.InvoiceR\x05items\"?\n\x14ListDiscountsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"P\n\x15ListDiscountsResponse\x12\x37\n\x05items\x18\x01 \x03(\x0b\x32!.qdrant.cloud.billing.v1.DiscountR\x05items\"\xc2\x02\n\x07Invoice\x12\x17\n\x02id\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x02id\x12$\n\x06number\x18\x02 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x06number\x88\x01\x01\x12*\n\x0ctotal_amount\x18\x03 \x01(\x03\x42\x07\xbaH\x04\"\x02(\x00R\x0btotalAmount\x12\x41\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\tcreatedAt\x12J\n\x06status\x18\x05 \x01(\x0e\x32&.qdrant.cloud.billing.v1.InvoiceStatusB\n\xbaH\x07\x82\x01\x04\x10\x01 \x00R\x06status\x12&\n\x07pdf_url\x18\x06 \x01(\tB\x08\xbaH\x05r\x03\x88\x01\x01H\x01R\x06pdfUrl\x88\x01\x01\x42\t\n\x07_numberB\n\n\x08_pdf_url\"\xba\x03\n\x08\x44iscount\x12\x1b\n\x04name\x18\x01 \x01(\tB\x07\xbaH\x04r\x02\x10\x01R\x04name\x12M\n\npercentage\x18\x02 \x01(\x0b\x32+.qdrant.cloud.billing.v1.DiscountPercentageH\x00R\npercentage\x12>\n\x05\x66ixed\x18\x03 \x01(\x0b\x32&.qdrant.cloud.billing.v1.DiscountFixedH\x00R\x05\x66ixed\x12\x41\n\nvalid_from\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\tvalidFrom\x12H\n\x0bvalid_until\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0b\xbaH\x08\xb2\x01\x02@\x00\xc8\x01\x01R\nvalidUntil:f\xbaHc\x1a\x61\n\x15\x64iscount.valid_period\x12$valid_until must be after valid_from\x1a\"this.valid_until > this.valid_fromB\r\n\x04type\x12\x05\xbaH\x02\x08\x01\"C\n\x12\x44iscountPercentage\x12-\n\x05value\x18\x01 \x01(\x01\x42\x17\xbaH\x14\x12\x12\x19\x00\x00\x00\x00\x00\x00Y@)\x00\x00\x00\x00\x00\x00\x00\x00R\x05value\"d\n\rDiscountFixed\x12$\n\x05value\x18\x01 \x01(\x01\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x05value\x12-\n\x08\x63urrency\x18\x02 \x01(\tB\x11\xbaH\x0er\x0c\x32\n^[A-Z]{3}$R\x08\x63urrency\"E\n\x1aListCreditContractsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"\\\n\x1bListCreditContractsResponse\x12=\n\x05items\x18\x01 \x03(\x0b\x32\'.qdrant.cloud.billing.v1.CreditContractR\x05items\"P\n%ListCreditContractConsumptionsRequest\x12\'\n\naccount_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\"r\n&ListCreditContractConsumptionsResponse\x12H\n\x05items\x18\x01 \x03(\x0b\x32\x32.qdrant.cloud.billing.v1.CreditContractConsumptionR\x05items\"\xa1\x02\n\x19\x43reditContractConsumption\x12\x36\n\x12\x63redit_contract_id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x10\x63reditContractId\x12\x31\n\x0ctotal_amount\x18\x02 \x01(\x01\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x0btotalAmount\x12/\n\x0bused_amount\x18\x03 \x01(\x01\x42\x0e\xbaH\x0b\x12\t)\x00\x00\x00\x00\x00\x00\x00\x00R\nusedAmount\x12\x39\n\x10remaining_amount\x18\x04 \x01(\x01\x42\x0e\xbaH\x0b\x12\t)\x00\x00\x00\x00\x00\x00\x00\x00R\x0fremainingAmount\x12-\n\x08\x63urrency\x18\x05 \x01(\tB\x11\xbaH\x0er\x0c\x32\n^[A-Z]{3}$R\x08\x63urrency\"\xcd\x03\n\x0e\x43reditContract\x12\x18\n\x02id\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x02id\x12\'\n\naccount_id\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\taccountId\x12\x31\n\x0ctotal_amount\x18\x03 \x01(\x01\x42\x0e\xbaH\x0b\x12\t!\x00\x00\x00\x00\x00\x00\x00\x00R\x0btotalAmount\x12-\n\x08\x63urrency\x18\x04 \x01(\tB\x11\xbaH\x0er\x0c\x32\n^[A-Z]{3}$R\x08\x63urrency\x12\x62\n\x11\x62illing_frequency\x18\x05 \x01(\x0e\x32).qdrant.cloud.billing.v1.BillingFrequencyB\n\xbaH\x07\x82\x01\x04\x10\x01 \x00R\x10\x62illingFrequency\x12\x43\n\x0b\x61\x63tive_from\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\nactiveFrom\x12?\n\tactive_to\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\x08\x61\x63tiveTo\x12\"\n\x05notes\x18\x08 \x01(\tB\x07\xbaH\x04r\x02\x10\x01H\x00R\x05notes\x88\x01\x01\x42\x08\n\x06_notes*\xb6\x01\n\x10\x42illingFrequency\x12!\n\x1d\x42ILLING_FREQUENCY_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x42ILLING_FREQUENCY_MONTHLY\x10\x01\x12\x1f\n\x1b\x42ILLING_FREQUENCY_QUARTERLY\x10\x02\x12!\n\x1d\x42ILLING_FREQUENCY_SEMI_ANNUAL\x10\x03\x12\x1c\n\x18\x42ILLING_FREQUENCY_ANNUAL\x10\x04*\xb6\x01\n\rInvoiceStatus\x12\x1e\n\x1aINVOICE_STATUS_UNSPECIFIED\x10\x00\x12\x18\n\x14INVOICE_STATUS_DRAFT\x10\x01\x12\x17\n\x13INVOICE_STATUS_OPEN\x10\x02\x12\x17\n\x13INVOICE_STATUS_VOID\x10\x03\x12\x17\n\x13INVOICE_STATUS_PAID\x10\x04\x12 \n\x1cINVOICE_STATUS_UNCOLLECTIBLE\x10\x05\x32\x8b\x07\n\x0e\x42illingService\x12\xbf\x01\n\x0cListInvoices\x12,.qdrant.cloud.billing.v1.ListInvoicesRequest\x1a-.qdrant.cloud.billing.v1.ListInvoicesResponse\"R\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x30\x12./api/billing/v1/accounts/{account_id}/invoices\x12\xc3\x01\n\rListDiscounts\x12-.qdrant.cloud.billing.v1.ListDiscountsRequest\x1a..qdrant.cloud.billing.v1.ListDiscountsResponse\"S\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x31\x12//api/billing/v1/accounts/{account_id}/discounts\x12\xdc\x01\n\x13ListCreditContracts\x12\x33.qdrant.cloud.billing.v1.ListCreditContractsRequest\x1a\x34.qdrant.cloud.billing.v1.ListCreditContractsResponse\"Z\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x38\x12\x36/api/billing/v1/accounts/{account_id}/credit-contracts\x12\x89\x02\n\x1eListCreditContractConsumptions\x12>.qdrant.cloud.billing.v1.ListCreditContractConsumptionsRequest\x1a?.qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse\"f\x8a\xb5\x18\x18read:payment_information\x82\xd3\xe4\x93\x02\x44\x12\x42/api/billing/v1/accounts/{account_id}/credit-contract-consumptions\x1a\x06\xc2\xb5\x18\x02\x08\x01\x42\xfe\x01\n\x1b\x63om.qdrant.cloud.billing.v1B\x0c\x42illingProtoP\x01ZRgithub.com/qdrant/qdrant-cloud-public-api/gen/go/qdrant/cloud/billing/v1;billingv1\xa2\x02\x03QCB\xaa\x02\x17Qdrant.Cloud.Billing.V1\xca\x02\x17Qdrant\\Cloud\\Billing\\V1\xe2\x02#Qdrant\\Cloud\\Billing\\V1\\GPBMetadata\xea\x02\x1aQdrant::Cloud::Billing::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -70,6 +70,18 @@ _globals['_DISCOUNTFIXED'].fields_by_name['currency']._serialized_options = b'\272H\016r\0142\n^[A-Z]{3}$' _globals['_LISTCREDITCONTRACTSREQUEST'].fields_by_name['account_id']._loaded_options = None _globals['_LISTCREDITCONTRACTSREQUEST'].fields_by_name['account_id']._serialized_options = b'\272H\005r\003\260\001\001' + _globals['_LISTCREDITCONTRACTCONSUMPTIONSREQUEST'].fields_by_name['account_id']._loaded_options = None + _globals['_LISTCREDITCONTRACTCONSUMPTIONSREQUEST'].fields_by_name['account_id']._serialized_options = b'\272H\005r\003\260\001\001' + _globals['_CREDITCONTRACTCONSUMPTION'].fields_by_name['credit_contract_id']._loaded_options = None + _globals['_CREDITCONTRACTCONSUMPTION'].fields_by_name['credit_contract_id']._serialized_options = b'\272H\005r\003\260\001\001' + _globals['_CREDITCONTRACTCONSUMPTION'].fields_by_name['total_amount']._loaded_options = None + _globals['_CREDITCONTRACTCONSUMPTION'].fields_by_name['total_amount']._serialized_options = b'\272H\013\022\t!\000\000\000\000\000\000\000\000' + _globals['_CREDITCONTRACTCONSUMPTION'].fields_by_name['used_amount']._loaded_options = None + _globals['_CREDITCONTRACTCONSUMPTION'].fields_by_name['used_amount']._serialized_options = b'\272H\013\022\t)\000\000\000\000\000\000\000\000' + _globals['_CREDITCONTRACTCONSUMPTION'].fields_by_name['remaining_amount']._loaded_options = None + _globals['_CREDITCONTRACTCONSUMPTION'].fields_by_name['remaining_amount']._serialized_options = b'\272H\013\022\t)\000\000\000\000\000\000\000\000' + _globals['_CREDITCONTRACTCONSUMPTION'].fields_by_name['currency']._loaded_options = None + _globals['_CREDITCONTRACTCONSUMPTION'].fields_by_name['currency']._serialized_options = b'\272H\016r\0142\n^[A-Z]{3}$' _globals['_CREDITCONTRACT'].fields_by_name['id']._loaded_options = None _globals['_CREDITCONTRACT'].fields_by_name['id']._serialized_options = b'\272H\005r\003\260\001\001' _globals['_CREDITCONTRACT'].fields_by_name['account_id']._loaded_options = None @@ -94,10 +106,12 @@ _globals['_BILLINGSERVICE'].methods_by_name['ListDiscounts']._serialized_options = b'\212\265\030\030read:payment_information\202\323\344\223\0021\022//api/billing/v1/accounts/{account_id}/discounts' _globals['_BILLINGSERVICE'].methods_by_name['ListCreditContracts']._loaded_options = None _globals['_BILLINGSERVICE'].methods_by_name['ListCreditContracts']._serialized_options = b'\212\265\030\030read:payment_information\202\323\344\223\0028\0226/api/billing/v1/accounts/{account_id}/credit-contracts' - _globals['_BILLINGFREQUENCY']._serialized_start=2057 - _globals['_BILLINGFREQUENCY']._serialized_end=2239 - _globals['_INVOICESTATUS']._serialized_start=2242 - _globals['_INVOICESTATUS']._serialized_end=2424 + _globals['_BILLINGSERVICE'].methods_by_name['ListCreditContractConsumptions']._loaded_options = None + _globals['_BILLINGSERVICE'].methods_by_name['ListCreditContractConsumptions']._serialized_options = b'\212\265\030\030read:payment_information\202\323\344\223\002D\022B/api/billing/v1/accounts/{account_id}/credit-contract-consumptions' + _globals['_BILLINGFREQUENCY']._serialized_start=2547 + _globals['_BILLINGFREQUENCY']._serialized_end=2729 + _globals['_INVOICESTATUS']._serialized_start=2732 + _globals['_INVOICESTATUS']._serialized_end=2914 _globals['_LISTINVOICESREQUEST']._serialized_start=195 _globals['_LISTINVOICESREQUEST']._serialized_end=257 _globals['_LISTINVOICESRESPONSE']._serialized_start=259 @@ -118,8 +132,14 @@ _globals['_LISTCREDITCONTRACTSREQUEST']._serialized_end=1496 _globals['_LISTCREDITCONTRACTSRESPONSE']._serialized_start=1498 _globals['_LISTCREDITCONTRACTSRESPONSE']._serialized_end=1590 - _globals['_CREDITCONTRACT']._serialized_start=1593 - _globals['_CREDITCONTRACT']._serialized_end=2054 - _globals['_BILLINGSERVICE']._serialized_start=2427 - _globals['_BILLINGSERVICE']._serialized_end=3066 + _globals['_LISTCREDITCONTRACTCONSUMPTIONSREQUEST']._serialized_start=1592 + _globals['_LISTCREDITCONTRACTCONSUMPTIONSREQUEST']._serialized_end=1672 + _globals['_LISTCREDITCONTRACTCONSUMPTIONSRESPONSE']._serialized_start=1674 + _globals['_LISTCREDITCONTRACTCONSUMPTIONSRESPONSE']._serialized_end=1788 + _globals['_CREDITCONTRACTCONSUMPTION']._serialized_start=1791 + _globals['_CREDITCONTRACTCONSUMPTION']._serialized_end=2080 + _globals['_CREDITCONTRACT']._serialized_start=2083 + _globals['_CREDITCONTRACT']._serialized_end=2544 + _globals['_BILLINGSERVICE']._serialized_start=2917 + _globals['_BILLINGSERVICE']._serialized_end=3824 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/qdrant/cloud/billing/v1/billing_pb2.pyi b/gen/python/qdrant/cloud/billing/v1/billing_pb2.pyi index 8190d630..dade18b4 100644 --- a/gen/python/qdrant/cloud/billing/v1/billing_pb2.pyi +++ b/gen/python/qdrant/cloud/billing/v1/billing_pb2.pyi @@ -121,6 +121,32 @@ class ListCreditContractsResponse(_message.Message): items: _containers.RepeatedCompositeFieldContainer[CreditContract] def __init__(self, items: _Optional[_Iterable[_Union[CreditContract, _Mapping]]] = ...) -> None: ... +class ListCreditContractConsumptionsRequest(_message.Message): + __slots__ = ("account_id",) + ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + account_id: str + def __init__(self, account_id: _Optional[str] = ...) -> None: ... + +class ListCreditContractConsumptionsResponse(_message.Message): + __slots__ = ("items",) + ITEMS_FIELD_NUMBER: _ClassVar[int] + items: _containers.RepeatedCompositeFieldContainer[CreditContractConsumption] + def __init__(self, items: _Optional[_Iterable[_Union[CreditContractConsumption, _Mapping]]] = ...) -> None: ... + +class CreditContractConsumption(_message.Message): + __slots__ = ("credit_contract_id", "total_amount", "used_amount", "remaining_amount", "currency") + CREDIT_CONTRACT_ID_FIELD_NUMBER: _ClassVar[int] + TOTAL_AMOUNT_FIELD_NUMBER: _ClassVar[int] + USED_AMOUNT_FIELD_NUMBER: _ClassVar[int] + REMAINING_AMOUNT_FIELD_NUMBER: _ClassVar[int] + CURRENCY_FIELD_NUMBER: _ClassVar[int] + credit_contract_id: str + total_amount: float + used_amount: float + remaining_amount: float + currency: str + def __init__(self, credit_contract_id: _Optional[str] = ..., total_amount: _Optional[float] = ..., used_amount: _Optional[float] = ..., remaining_amount: _Optional[float] = ..., currency: _Optional[str] = ...) -> None: ... + class CreditContract(_message.Message): __slots__ = ("id", "account_id", "total_amount", "currency", "billing_frequency", "active_from", "active_to", "notes") ID_FIELD_NUMBER: _ClassVar[int] diff --git a/gen/python/qdrant/cloud/billing/v1/billing_pb2_grpc.py b/gen/python/qdrant/cloud/billing/v1/billing_pb2_grpc.py index 17022446..8a25d88a 100644 --- a/gen/python/qdrant/cloud/billing/v1/billing_pb2_grpc.py +++ b/gen/python/qdrant/cloud/billing/v1/billing_pb2_grpc.py @@ -30,6 +30,11 @@ def __init__(self, channel): request_serializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractsRequest.SerializeToString, response_deserializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractsResponse.FromString, _registered_method=True) + self.ListCreditContractConsumptions = channel.unary_unary( + '/qdrant.cloud.billing.v1.BillingService/ListCreditContractConsumptions', + request_serializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractConsumptionsRequest.SerializeToString, + response_deserializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractConsumptionsResponse.FromString, + _registered_method=True) class BillingServiceServicer(object): @@ -63,6 +68,16 @@ def ListCreditContracts(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def ListCreditContractConsumptions(self, request, context): + """Lists consumption data for all credit contracts for the account identified by the given ID. + Consumption data includes the total, used, and remaining amounts sourced from Orb. + Required permissions: + - read:payment_information + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_BillingServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -81,6 +96,11 @@ def add_BillingServiceServicer_to_server(servicer, server): request_deserializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractsRequest.FromString, response_serializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractsResponse.SerializeToString, ), + 'ListCreditContractConsumptions': grpc.unary_unary_rpc_method_handler( + servicer.ListCreditContractConsumptions, + request_deserializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractConsumptionsRequest.FromString, + response_serializer=qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractConsumptionsResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'qdrant.cloud.billing.v1.BillingService', rpc_method_handlers) @@ -173,3 +193,30 @@ def ListCreditContracts(request, timeout, metadata, _registered_method=True) + + @staticmethod + def ListCreditContractConsumptions(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/qdrant.cloud.billing.v1.BillingService/ListCreditContractConsumptions', + qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractConsumptionsRequest.SerializeToString, + qdrant_dot_cloud_dot_billing_dot_v1_dot_billing__pb2.ListCreditContractConsumptionsResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.d.ts b/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.d.ts index dc07bad0..7c857c0e 100644 --- a/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.d.ts +++ b/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.d.ts @@ -28,3 +28,12 @@ export const listDiscounts: typeof BillingService["method"]["listDiscounts"]; * @generated from rpc qdrant.cloud.billing.v1.BillingService.ListCreditContracts */ export const listCreditContracts: typeof BillingService["method"]["listCreditContracts"]; +/** + * Lists consumption data for all credit contracts for the account identified by the given ID. + * Consumption data includes the total, used, and remaining amounts sourced from Orb. + * Required permissions: + * - read:payment_information + * + * @generated from rpc qdrant.cloud.billing.v1.BillingService.ListCreditContractConsumptions + */ +export const listCreditContractConsumptions: typeof BillingService["method"]["listCreditContractConsumptions"]; diff --git a/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.js b/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.js index 73b0ece6..1f86e7ad 100644 --- a/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.js +++ b/gen/typescript/qdrant/cloud/billing/v1/billing-BillingService_connectquery.js @@ -30,3 +30,13 @@ export const listDiscounts = BillingService.method.listDiscounts; * @generated from rpc qdrant.cloud.billing.v1.BillingService.ListCreditContracts */ export const listCreditContracts = BillingService.method.listCreditContracts; + +/** + * Lists consumption data for all credit contracts for the account identified by the given ID. + * Consumption data includes the total, used, and remaining amounts sourced from Orb. + * Required permissions: + * - read:payment_information + * + * @generated from rpc qdrant.cloud.billing.v1.BillingService.ListCreditContractConsumptions + */ +export const listCreditContractConsumptions = BillingService.method.listCreditContractConsumptions; diff --git a/gen/typescript/qdrant/cloud/billing/v1/billing_pb.d.ts b/gen/typescript/qdrant/cloud/billing/v1/billing_pb.d.ts index 461ead83..7da05f33 100644 --- a/gen/typescript/qdrant/cloud/billing/v1/billing_pb.d.ts +++ b/gen/typescript/qdrant/cloud/billing/v1/billing_pb.d.ts @@ -451,6 +451,102 @@ export declare type ListCreditContractsResponseValid = Message<"qdrant.cloud.bil */ export declare const ListCreditContractsResponseSchema: GenMessage; +/** + * ListCreditContractConsumptionsRequest is the request for the ListCreditContractConsumptions function + * + * @generated from message qdrant.cloud.billing.v1.ListCreditContractConsumptionsRequest + */ +export declare type ListCreditContractConsumptionsRequest = Message<"qdrant.cloud.billing.v1.ListCreditContractConsumptionsRequest"> & { + /** + * The identifier of the account (in GUID format). + * This is a required field. + * + * @generated from field: string account_id = 1; + */ + accountId: string; +}; + +export declare type ListCreditContractConsumptionsRequestValid = ListCreditContractConsumptionsRequest; + +/** + * Describes the message qdrant.cloud.billing.v1.ListCreditContractConsumptionsRequest. + * Use `create(ListCreditContractConsumptionsRequestSchema)` to create a new message. + */ +export declare const ListCreditContractConsumptionsRequestSchema: GenMessage; + +/** + * ListCreditContractConsumptionsResponse is the response from the ListCreditContractConsumptions function + * + * @generated from message qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse + */ +export declare type ListCreditContractConsumptionsResponse = Message<"qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse"> & { + /** + * The list of credit contract consumptions. + * + * @generated from field: repeated qdrant.cloud.billing.v1.CreditContractConsumption items = 1; + */ + items: CreditContractConsumption[]; +}; + +export declare type ListCreditContractConsumptionsResponseValid = ListCreditContractConsumptionsResponse; + +/** + * Describes the message qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse. + * Use `create(ListCreditContractConsumptionsResponseSchema)` to create a new message. + */ +export declare const ListCreditContractConsumptionsResponseSchema: GenMessage; + +/** + * CreditContractConsumption represents the consumption data for a credit contract. + * + * @generated from message qdrant.cloud.billing.v1.CreditContractConsumption + */ +export declare type CreditContractConsumption = Message<"qdrant.cloud.billing.v1.CreditContractConsumption"> & { + /** + * The identifier of the credit contract this consumption belongs to. + * + * @generated from field: string credit_contract_id = 1; + */ + creditContractId: string; + + /** + * Total contract value. + * + * @generated from field: double total_amount = 2; + */ + totalAmount: number; + + /** + * Amount consumed so far. + * + * @generated from field: double used_amount = 3; + */ + usedAmount: number; + + /** + * Amount remaining. + * + * @generated from field: double remaining_amount = 4; + */ + remainingAmount: number; + + /** + * The currency of the amounts. + * Must be a 3-letter ISO 4217 currency code (e.g., "USD"). + * + * @generated from field: string currency = 5; + */ + currency: string; +}; + +export declare type CreditContractConsumptionValid = CreditContractConsumption; + +/** + * Describes the message qdrant.cloud.billing.v1.CreditContractConsumption. + * Use `create(CreditContractConsumptionSchema)` to create a new message. + */ +export declare const CreditContractConsumptionSchema: GenMessage; + /** * CreditContract represents a prepaid credit contract for an organization. * @@ -728,5 +824,18 @@ export declare const BillingService: GenService<{ input: typeof ListCreditContractsRequestSchema; output: typeof ListCreditContractsResponseSchema; }, + /** + * Lists consumption data for all credit contracts for the account identified by the given ID. + * Consumption data includes the total, used, and remaining amounts sourced from Orb. + * Required permissions: + * - read:payment_information + * + * @generated from rpc qdrant.cloud.billing.v1.BillingService.ListCreditContractConsumptions + */ + listCreditContractConsumptions: { + methodKind: "unary"; + input: typeof ListCreditContractConsumptionsRequestSchema; + output: typeof ListCreditContractConsumptionsResponseSchema; + }, }>; diff --git a/gen/typescript/qdrant/cloud/billing/v1/billing_pb.js b/gen/typescript/qdrant/cloud/billing/v1/billing_pb.js index 98881db5..09434cc8 100644 --- a/gen/typescript/qdrant/cloud/billing/v1/billing_pb.js +++ b/gen/typescript/qdrant/cloud/billing/v1/billing_pb.js @@ -12,7 +12,7 @@ import { file_qdrant_cloud_common_v1_common } from "../../common/v1/common_pb.js * Describes the file qdrant/cloud/billing/v1/billing.proto. */ export const file_qdrant_cloud_billing_v1_billing = /*@__PURE__*/ - fileDesc("CiVxZHJhbnQvY2xvdWQvYmlsbGluZy92MS9iaWxsaW5nLnByb3RvEhdxZHJhbnQuY2xvdWQuYmlsbGluZy52MSIzChNMaXN0SW52b2ljZXNSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBIkcKFExpc3RJbnZvaWNlc1Jlc3BvbnNlEi8KBWl0ZW1zGAEgAygLMiAucWRyYW50LmNsb3VkLmJpbGxpbmcudjEuSW52b2ljZSI0ChRMaXN0RGlzY291bnRzUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABASJJChVMaXN0RGlzY291bnRzUmVzcG9uc2USMAoFaXRlbXMYASADKAsyIS5xZHJhbnQuY2xvdWQuYmlsbGluZy52MS5EaXNjb3VudCKOAgoHSW52b2ljZRITCgJpZBgBIAEoCUIHukgEcgIQARIcCgZudW1iZXIYAiABKAlCB7pIBHICEAFIAIgBARIdCgx0b3RhbF9hbW91bnQYAyABKANCB7pIBCICKAASNgoKY3JlYXRlZF9hdBgEIAEoCzIaLmdvb2dsZS5wcm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xvdWRcQmlsbGluZ1xWMVxHUEJNZXRhZGF0YeoCGlFkcmFudDo6Q2xvdWQ6OkJpbGxpbmc6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_google_protobuf_timestamp, file_qdrant_cloud_common_v1_common]); + fileDesc("CiVxZHJhbnQvY2xvdWQvYmlsbGluZy92MS9iaWxsaW5nLnByb3RvEhdxZHJhbnQuY2xvdWQuYmlsbGluZy52MSIzChNMaXN0SW52b2ljZXNSZXF1ZXN0EhwKCmFjY291bnRfaWQYASABKAlCCLpIBXIDsAEBIkcKFExpc3RJbnZvaWNlc1Jlc3BvbnNlEi8KBWl0ZW1zGAEgAygLMiAucWRyYW50LmNsb3VkLmJpbGxpbmcudjEuSW52b2ljZSI0ChRMaXN0RGlzY291bnRzUmVxdWVzdBIcCgphY2NvdW50X2lkGAEgASgJQgi6SAVyA7ABASJJChVMaXN0RGlzY291bnRzUmVzcG9uc2USMAoFaXRlbXMYASADKAsyIS5xZHJhbnQuY2xvdWQuYmlsbGluZy52MS5EaXNjb3VudCKOAgoHSW52b2ljZRITCgJpZBgBIAEoCUIHukgEcgIQARIcCgZudW1iZXIYAiABKAlCB7pIBHICEAFIAIgBARIdCgx0b3RhbF9hbW91bnQYAyABKANCB7pIBCICKAASNgoKY3JlYXRlZF9hdBgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCBrpIA8gBARJCCgZzdGF0dXMYBSABKA4yJi5xZHJhbnQuY2xvdWQuYmlsbGluZy52MS5JbnZvaWNlU3RhdHVzQgq6SAeCAQQQASAAEh4KB3BkZl91cmwYBiABKAlCCLpIBXIDiAEBSAGIAQFCCQoHX251bWJlckIKCghfcGRmX3VybCKKAwoIRGlzY291bnQSFQoEbmFtZRgBIAEoCUIHukgEcgIQARJBCgpwZXJjZW50YWdlGAIgASgLMisucWRyYW50LmNsb3VkLmJpbGxpbmcudjEuRGlzY291bnRQZXJjZW50YWdlSAASNwoFZml4ZWQYAyABK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250cmFjdENvbnN1bXB0aW9uc1JlcXVlc3QaPy5xZHJhbnQuY2xvdWQuYmlsbGluZy52MS5MaXN0Q3JlZGl0Q29udHJhY3RDb25zdW1wdGlvbnNSZXNwb25zZSJmirUYGHJlYWQ6cGF5bWVudF9pbmZvcm1hdGlvboLT5JMCRBJCL2FwaS9iaWxsaW5nL3YxL2FjY291bnRzL3thY2NvdW50X2lkfS9jcmVkaXQtY29udHJhY3QtY29uc3VtcHRpb25zGgbCtRgCCAFC/gEKG2NvbS5xZHJhbnQuY2xvdWQuYmlsbGluZy52MUIMQmlsbGluZ1Byb3RvUAFaUmdpdGh1Yi5jb20vcWRyYW50L3FkcmFudC1jbG91ZC1wdWJsaWMtYXBpL2dlbi9nby9xZHJhbnQvY2xvdWQvYmlsbGluZy92MTtiaWxsaW5ndjGiAgNRQ0KqAhdRZHJhbnQuQ2xvdWQuQmlsbGluZy5WMcoCF1FkcmFudFxDbG91ZFxCaWxsaW5nXFYx4gIjUWRyYW50XENsb3VkXEJpbGxpbmdcVjFcR1BCTWV0YWRhdGHqAhpRZHJhbnQ6OkNsb3VkOjpCaWxsaW5nOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_protobuf_timestamp, file_qdrant_cloud_common_v1_common]); /** * Describes the message qdrant.cloud.billing.v1.ListInvoicesRequest. @@ -84,12 +84,33 @@ export const ListCreditContractsRequestSchema = /*@__PURE__*/ export const ListCreditContractsResponseSchema = /*@__PURE__*/ messageDesc(file_qdrant_cloud_billing_v1_billing, 9); +/** + * Describes the message qdrant.cloud.billing.v1.ListCreditContractConsumptionsRequest. + * Use `create(ListCreditContractConsumptionsRequestSchema)` to create a new message. + */ +export const ListCreditContractConsumptionsRequestSchema = /*@__PURE__*/ + messageDesc(file_qdrant_cloud_billing_v1_billing, 10); + +/** + * Describes the message qdrant.cloud.billing.v1.ListCreditContractConsumptionsResponse. + * Use `create(ListCreditContractConsumptionsResponseSchema)` to create a new message. + */ +export const ListCreditContractConsumptionsResponseSchema = /*@__PURE__*/ + messageDesc(file_qdrant_cloud_billing_v1_billing, 11); + +/** + * Describes the message qdrant.cloud.billing.v1.CreditContractConsumption. + * Use `create(CreditContractConsumptionSchema)` to create a new message. + */ +export const CreditContractConsumptionSchema = /*@__PURE__*/ + messageDesc(file_qdrant_cloud_billing_v1_billing, 12); + /** * Describes the message qdrant.cloud.billing.v1.CreditContract. * Use `create(CreditContractSchema)` to create a new message. */ export const CreditContractSchema = /*@__PURE__*/ - messageDesc(file_qdrant_cloud_billing_v1_billing, 10); + messageDesc(file_qdrant_cloud_billing_v1_billing, 13); /** * Describes the enum qdrant.cloud.billing.v1.BillingFrequency. diff --git a/proto/qdrant/cloud/billing/v1/billing.proto b/proto/qdrant/cloud/billing/v1/billing.proto index e2887acc..5f31b055 100644 --- a/proto/qdrant/cloud/billing/v1/billing.proto +++ b/proto/qdrant/cloud/billing/v1/billing.proto @@ -42,6 +42,16 @@ service BillingService { // gRPC Gateway REST call option (google.api.http) = {get: "/api/billing/v1/accounts/{account_id}/credit-contracts"}; } + // Lists consumption data for all credit contracts for the account identified by the given ID. + // Consumption data includes the total, used, and remaining amounts sourced from Orb. + // Required permissions: + // - read:payment_information + rpc ListCreditContractConsumptions(ListCreditContractConsumptionsRequest) returns (ListCreditContractConsumptionsResponse) { + // permissions + option (common.v1.permissions) = "read:payment_information"; + // gRPC Gateway REST call + option (google.api.http) = {get: "/api/billing/v1/accounts/{account_id}/credit-contract-consumptions"}; + } } // ListInvoicesRequest is the request for the ListInvoices function @@ -151,6 +161,35 @@ message ListCreditContractsResponse { repeated CreditContract items = 1; } +// ListCreditContractConsumptionsRequest is the request for the ListCreditContractConsumptions function +message ListCreditContractConsumptionsRequest { + // The identifier of the account (in GUID format). + // This is a required field. + string account_id = 1 [(buf.validate.field).string = {uuid: true}]; +} + +// ListCreditContractConsumptionsResponse is the response from the ListCreditContractConsumptions function +message ListCreditContractConsumptionsResponse { + // The list of credit contract consumptions. + repeated CreditContractConsumption items = 1; +} + +// buf:lint:ignore QDRANT_CLOUD_REQUIRED_ENTITY_FIELDS +// CreditContractConsumption represents the consumption data for a credit contract. +message CreditContractConsumption { + // The identifier of the credit contract this consumption belongs to. + string credit_contract_id = 1 [(buf.validate.field).string = {uuid: true}]; + // Total contract value. + double total_amount = 2 [(buf.validate.field).double.gt = 0.0]; + // Amount consumed so far. + double used_amount = 3 [(buf.validate.field).double.gte = 0.0]; + // Amount remaining. + double remaining_amount = 4 [(buf.validate.field).double.gte = 0.0]; + // The currency of the amounts. + // Must be a 3-letter ISO 4217 currency code (e.g., "USD"). + string currency = 5 [(buf.validate.field).string = {pattern: "^[A-Z]{3}$"}]; +} + // buf:lint:ignore QDRANT_CLOUD_REQUIRED_ENTITY_FIELDS // CreditContract represents a prepaid credit contract for an organization. message CreditContract {