You've already forked npm-core-sdk
Latest generation
This commit is contained in:
83
messaging.ts
83
messaging.ts
@@ -52,6 +52,23 @@ export interface GetMessagingUsageResponse {
|
||||
*/
|
||||
Usage: number;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.GetMessagingPeriodUsageRequest
|
||||
*/
|
||||
export interface GetMessagingPeriodUsageRequest {
|
||||
/**
|
||||
* @generated from protobuf field: string ProjectID = 1
|
||||
*/
|
||||
ProjectID: string;
|
||||
/**
|
||||
* @generated from protobuf field: string From = 2
|
||||
*/
|
||||
From: string; // ISO 8601 date string representing the start of the period for which to retrieve usage data (e.g., "2023-01-01T00:00:00Z").
|
||||
/**
|
||||
* @generated from protobuf field: string To = 3
|
||||
*/
|
||||
To: string; // ISO 8601 date string representing the end of the period for which to retrieve usage data (e.g., "2023-01-31T23:59:59Z").
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.IsMessagingMaxUsageReachedRequest
|
||||
*/
|
||||
@@ -264,6 +281,69 @@ class GetMessagingUsageResponse$Type extends MessageType<GetMessagingUsageRespon
|
||||
*/
|
||||
export const GetMessagingUsageResponse = new GetMessagingUsageResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class GetMessagingPeriodUsageRequest$Type extends MessageType<GetMessagingPeriodUsageRequest> {
|
||||
constructor() {
|
||||
super("api.GetMessagingPeriodUsageRequest", [
|
||||
{ no: 1, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
||||
{ no: 2, name: "From", kind: "scalar", localName: "From", jsonName: "From", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "UTC date/time in <a href='https://en.wikipedia.org/wiki/ISO_8601'>ISO 8601</a> format" } } },
|
||||
{ no: 3, name: "To", kind: "scalar", localName: "To", jsonName: "To", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "UTC date/time in <a href='https://en.wikipedia.org/wiki/ISO_8601'>ISO 8601</a> format" } } }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID"] } } });
|
||||
}
|
||||
create(value?: PartialMessage<GetMessagingPeriodUsageRequest>): GetMessagingPeriodUsageRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.ProjectID = "";
|
||||
message.From = "";
|
||||
message.To = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<GetMessagingPeriodUsageRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetMessagingPeriodUsageRequest): GetMessagingPeriodUsageRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string ProjectID */ 1:
|
||||
message.ProjectID = reader.string();
|
||||
break;
|
||||
case /* string From */ 2:
|
||||
message.From = reader.string();
|
||||
break;
|
||||
case /* string To */ 3:
|
||||
message.To = reader.string();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: GetMessagingPeriodUsageRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string ProjectID = 1; */
|
||||
if (message.ProjectID !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.ProjectID);
|
||||
/* string From = 2; */
|
||||
if (message.From !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.From);
|
||||
/* string To = 3; */
|
||||
if (message.To !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.To);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message api.GetMessagingPeriodUsageRequest
|
||||
*/
|
||||
export const GetMessagingPeriodUsageRequest = new GetMessagingPeriodUsageRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class IsMessagingMaxUsageReachedRequest$Type extends MessageType<IsMessagingMaxUsageReachedRequest> {
|
||||
constructor() {
|
||||
super("api.IsMessagingMaxUsageReachedRequest", [
|
||||
@@ -362,5 +442,6 @@ export const IsMessagingMaxUsageReachedResponse = new IsMessagingMaxUsageReached
|
||||
export const MessagingService = new ServiceType("api.MessagingService", [
|
||||
{ name: "SendSMS", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Messaging"], description: "Send a SMS message to a recipient" }, "api.rscType": "Project", "api.roles": "", "api.moduleID": "sms", "google.api.method_visibility": { restriction: "SDK" } }, I: SendSMSRequest, O: SendSMSResponse },
|
||||
{ name: "GetUsage", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Messaging"], description: "Retrieve the current messaging usage for a Project" }, "api.rscType": "Project", "api.roles": "", "api.moduleID": "sms", "google.api.method_visibility": { restriction: "SDK" } }, I: GetMessagingUsageRequest, O: GetMessagingUsageResponse },
|
||||
{ name: "IsMaxUsageReached", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Messaging"], description: "Check if the maximum messaging usage has been reached for a Project" }, "api.rscType": "Project", "api.roles": "", "api.moduleID": "sms", "google.api.method_visibility": { restriction: "SDK" } }, I: IsMessagingMaxUsageReachedRequest, O: IsMessagingMaxUsageReachedResponse }
|
||||
{ name: "IsMaxUsageReached", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Messaging"], description: "Check if the maximum messaging usage has been reached for a Project" }, "api.rscType": "Project", "api.roles": "", "api.moduleID": "sms", "google.api.method_visibility": { restriction: "SDK" } }, I: IsMessagingMaxUsageReachedRequest, O: IsMessagingMaxUsageReachedResponse },
|
||||
{ name: "GetPeriodUsage", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Messaging"], description: "Retrieve messaging usage for a specific period for a Project" }, "api.rscType": "Project", "api.roles": "Platform.SMS-Usage", "api.moduleID": "sms", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: GetMessagingPeriodUsageRequest, O: GetMessagingUsageResponse }
|
||||
], { "api.k8sService": "messaging-server" });
|
||||
|
||||
Reference in New Issue
Block a user