@xmtp/proto
Advanced tools
Comparing version 3.41.0-beta.2 to 3.41.0-beta.3
{ | ||
"name": "@xmtp/proto", | ||
"version": "3.41.0-beta.2", | ||
"version": "3.41.0-beta.3", | ||
"description": "Protobuf client and generated classes for GRPC API", | ||
@@ -5,0 +5,0 @@ "main": "./ts/dist/cjs/node.js", |
@@ -15,6 +15,6 @@ "use strict"; | ||
return { | ||
frameUrl: new Uint8Array(), | ||
buttonIndex: new Uint8Array(), | ||
conversationIdentifier: "", | ||
messageId: "", | ||
frameUrl: "", | ||
buttonIndex: "", | ||
timestampNs: long_1.default.UZERO, | ||
opaqueConversationIdentifier: "", | ||
}; | ||
@@ -24,13 +24,13 @@ } | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
if (message.frameUrl.length !== 0) { | ||
writer.uint32(10).bytes(message.frameUrl); | ||
if (message.frameUrl !== "") { | ||
writer.uint32(10).string(message.frameUrl); | ||
} | ||
if (message.buttonIndex.length !== 0) { | ||
writer.uint32(18).bytes(message.buttonIndex); | ||
if (message.buttonIndex !== "") { | ||
writer.uint32(18).string(message.buttonIndex); | ||
} | ||
if (message.conversationIdentifier !== "") { | ||
writer.uint32(26).string(message.conversationIdentifier); | ||
if (!message.timestampNs.isZero()) { | ||
writer.uint32(24).uint64(message.timestampNs); | ||
} | ||
if (message.messageId !== "") { | ||
writer.uint32(34).string(message.messageId); | ||
if (message.opaqueConversationIdentifier !== "") { | ||
writer.uint32(34).string(message.opaqueConversationIdentifier); | ||
} | ||
@@ -47,12 +47,12 @@ return writer; | ||
case 1: | ||
message.frameUrl = reader.bytes(); | ||
message.frameUrl = reader.string(); | ||
break; | ||
case 2: | ||
message.buttonIndex = reader.bytes(); | ||
message.buttonIndex = reader.string(); | ||
break; | ||
case 3: | ||
message.conversationIdentifier = reader.string(); | ||
message.timestampNs = reader.uint64(); | ||
break; | ||
case 4: | ||
message.messageId = reader.string(); | ||
message.opaqueConversationIdentifier = reader.string(); | ||
break; | ||
@@ -68,12 +68,10 @@ default: | ||
return { | ||
frameUrl: isSet(object.frameUrl) | ||
? bytesFromBase64(object.frameUrl) | ||
: new Uint8Array(), | ||
buttonIndex: isSet(object.buttonIndex) | ||
? bytesFromBase64(object.buttonIndex) | ||
: new Uint8Array(), | ||
conversationIdentifier: isSet(object.conversationIdentifier) | ||
? String(object.conversationIdentifier) | ||
frameUrl: isSet(object.frameUrl) ? String(object.frameUrl) : "", | ||
buttonIndex: isSet(object.buttonIndex) ? String(object.buttonIndex) : "", | ||
timestampNs: isSet(object.timestampNs) | ||
? long_1.default.fromValue(object.timestampNs) | ||
: long_1.default.UZERO, | ||
opaqueConversationIdentifier: isSet(object.opaqueConversationIdentifier) | ||
? String(object.opaqueConversationIdentifier) | ||
: "", | ||
messageId: isSet(object.messageId) ? String(object.messageId) : "", | ||
}; | ||
@@ -83,20 +81,22 @@ }, | ||
const obj = {}; | ||
message.frameUrl !== undefined && | ||
(obj.frameUrl = base64FromBytes(message.frameUrl !== undefined ? message.frameUrl : new Uint8Array())); | ||
message.frameUrl !== undefined && (obj.frameUrl = message.frameUrl); | ||
message.buttonIndex !== undefined && | ||
(obj.buttonIndex = base64FromBytes(message.buttonIndex !== undefined | ||
? message.buttonIndex | ||
: new Uint8Array())); | ||
message.conversationIdentifier !== undefined && | ||
(obj.conversationIdentifier = message.conversationIdentifier); | ||
message.messageId !== undefined && (obj.messageId = message.messageId); | ||
(obj.buttonIndex = message.buttonIndex); | ||
message.timestampNs !== undefined && | ||
(obj.timestampNs = (message.timestampNs || long_1.default.UZERO).toString()); | ||
message.opaqueConversationIdentifier !== undefined && | ||
(obj.opaqueConversationIdentifier = message.opaqueConversationIdentifier); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b, _c, _d; | ||
var _a, _b, _c; | ||
const message = createBaseFrameActionBody(); | ||
message.frameUrl = (_a = object.frameUrl) !== null && _a !== void 0 ? _a : new Uint8Array(); | ||
message.buttonIndex = (_b = object.buttonIndex) !== null && _b !== void 0 ? _b : new Uint8Array(); | ||
message.conversationIdentifier = (_c = object.conversationIdentifier) !== null && _c !== void 0 ? _c : ""; | ||
message.messageId = (_d = object.messageId) !== null && _d !== void 0 ? _d : ""; | ||
message.frameUrl = (_a = object.frameUrl) !== null && _a !== void 0 ? _a : ""; | ||
message.buttonIndex = (_b = object.buttonIndex) !== null && _b !== void 0 ? _b : ""; | ||
message.timestampNs = | ||
object.timestampNs !== undefined && object.timestampNs !== null | ||
? long_1.default.fromValue(object.timestampNs) | ||
: long_1.default.UZERO; | ||
message.opaqueConversationIdentifier = | ||
(_c = object.opaqueConversationIdentifier) !== null && _c !== void 0 ? _c : ""; | ||
return message; | ||
@@ -103,0 +103,0 @@ }, |
@@ -9,6 +9,6 @@ /* eslint-disable */ | ||
return { | ||
frameUrl: new Uint8Array(), | ||
buttonIndex: new Uint8Array(), | ||
conversationIdentifier: "", | ||
messageId: "", | ||
frameUrl: "", | ||
buttonIndex: "", | ||
timestampNs: Long.UZERO, | ||
opaqueConversationIdentifier: "", | ||
}; | ||
@@ -18,13 +18,13 @@ } | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.frameUrl.length !== 0) { | ||
writer.uint32(10).bytes(message.frameUrl); | ||
if (message.frameUrl !== "") { | ||
writer.uint32(10).string(message.frameUrl); | ||
} | ||
if (message.buttonIndex.length !== 0) { | ||
writer.uint32(18).bytes(message.buttonIndex); | ||
if (message.buttonIndex !== "") { | ||
writer.uint32(18).string(message.buttonIndex); | ||
} | ||
if (message.conversationIdentifier !== "") { | ||
writer.uint32(26).string(message.conversationIdentifier); | ||
if (!message.timestampNs.isZero()) { | ||
writer.uint32(24).uint64(message.timestampNs); | ||
} | ||
if (message.messageId !== "") { | ||
writer.uint32(34).string(message.messageId); | ||
if (message.opaqueConversationIdentifier !== "") { | ||
writer.uint32(34).string(message.opaqueConversationIdentifier); | ||
} | ||
@@ -41,12 +41,12 @@ return writer; | ||
case 1: | ||
message.frameUrl = reader.bytes(); | ||
message.frameUrl = reader.string(); | ||
break; | ||
case 2: | ||
message.buttonIndex = reader.bytes(); | ||
message.buttonIndex = reader.string(); | ||
break; | ||
case 3: | ||
message.conversationIdentifier = reader.string(); | ||
message.timestampNs = reader.uint64(); | ||
break; | ||
case 4: | ||
message.messageId = reader.string(); | ||
message.opaqueConversationIdentifier = reader.string(); | ||
break; | ||
@@ -62,12 +62,10 @@ default: | ||
return { | ||
frameUrl: isSet(object.frameUrl) | ||
? bytesFromBase64(object.frameUrl) | ||
: new Uint8Array(), | ||
buttonIndex: isSet(object.buttonIndex) | ||
? bytesFromBase64(object.buttonIndex) | ||
: new Uint8Array(), | ||
conversationIdentifier: isSet(object.conversationIdentifier) | ||
? String(object.conversationIdentifier) | ||
frameUrl: isSet(object.frameUrl) ? String(object.frameUrl) : "", | ||
buttonIndex: isSet(object.buttonIndex) ? String(object.buttonIndex) : "", | ||
timestampNs: isSet(object.timestampNs) | ||
? Long.fromValue(object.timestampNs) | ||
: Long.UZERO, | ||
opaqueConversationIdentifier: isSet(object.opaqueConversationIdentifier) | ||
? String(object.opaqueConversationIdentifier) | ||
: "", | ||
messageId: isSet(object.messageId) ? String(object.messageId) : "", | ||
}; | ||
@@ -77,20 +75,22 @@ }, | ||
const obj = {}; | ||
message.frameUrl !== undefined && | ||
(obj.frameUrl = base64FromBytes(message.frameUrl !== undefined ? message.frameUrl : new Uint8Array())); | ||
message.frameUrl !== undefined && (obj.frameUrl = message.frameUrl); | ||
message.buttonIndex !== undefined && | ||
(obj.buttonIndex = base64FromBytes(message.buttonIndex !== undefined | ||
? message.buttonIndex | ||
: new Uint8Array())); | ||
message.conversationIdentifier !== undefined && | ||
(obj.conversationIdentifier = message.conversationIdentifier); | ||
message.messageId !== undefined && (obj.messageId = message.messageId); | ||
(obj.buttonIndex = message.buttonIndex); | ||
message.timestampNs !== undefined && | ||
(obj.timestampNs = (message.timestampNs || Long.UZERO).toString()); | ||
message.opaqueConversationIdentifier !== undefined && | ||
(obj.opaqueConversationIdentifier = message.opaqueConversationIdentifier); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a, _b, _c, _d; | ||
var _a, _b, _c; | ||
const message = createBaseFrameActionBody(); | ||
message.frameUrl = (_a = object.frameUrl) !== null && _a !== void 0 ? _a : new Uint8Array(); | ||
message.buttonIndex = (_b = object.buttonIndex) !== null && _b !== void 0 ? _b : new Uint8Array(); | ||
message.conversationIdentifier = (_c = object.conversationIdentifier) !== null && _c !== void 0 ? _c : ""; | ||
message.messageId = (_d = object.messageId) !== null && _d !== void 0 ? _d : ""; | ||
message.frameUrl = (_a = object.frameUrl) !== null && _a !== void 0 ? _a : ""; | ||
message.buttonIndex = (_b = object.buttonIndex) !== null && _b !== void 0 ? _b : ""; | ||
message.timestampNs = | ||
object.timestampNs !== undefined && object.timestampNs !== null | ||
? Long.fromValue(object.timestampNs) | ||
: Long.UZERO; | ||
message.opaqueConversationIdentifier = | ||
(_c = object.opaqueConversationIdentifier) !== null && _c !== void 0 ? _c : ""; | ||
return message; | ||
@@ -97,0 +97,0 @@ }, |
@@ -12,7 +12,16 @@ import Long from "long"; | ||
export interface FrameActionBody { | ||
frameUrl: Uint8Array; | ||
buttonIndex: Uint8Array; | ||
conversationIdentifier: string; | ||
/** Also include a reference to the specific message */ | ||
messageId: string; | ||
/** | ||
* The URL of the frame that was clicked | ||
* May be different from `post_url` | ||
*/ | ||
frameUrl: string; | ||
/** The 1-indexed button that was clicked */ | ||
buttonIndex: string; | ||
/** Timestamp of the click in nanoseconds */ | ||
timestampNs: Long; | ||
/** | ||
* A unique identifier for the conversation, not tied to anything on the | ||
* network. Will not match the topic or conversation_id | ||
*/ | ||
opaqueConversationIdentifier: string; | ||
} | ||
@@ -42,12 +51,83 @@ /** | ||
fromPartial<I extends { | ||
frameUrl?: Uint8Array | undefined; | ||
buttonIndex?: Uint8Array | undefined; | ||
conversationIdentifier?: string | undefined; | ||
messageId?: string | undefined; | ||
frameUrl?: string | undefined; | ||
buttonIndex?: string | undefined; | ||
timestampNs?: string | number | Long | undefined; | ||
opaqueConversationIdentifier?: string | undefined; | ||
} & { | ||
frameUrl?: Uint8Array | undefined; | ||
buttonIndex?: Uint8Array | undefined; | ||
conversationIdentifier?: string | undefined; | ||
messageId?: string | undefined; | ||
} & { [K in Exclude<keyof I, keyof FrameActionBody>]: never; }>(object: I): FrameActionBody; | ||
frameUrl?: string | undefined; | ||
buttonIndex?: string | undefined; | ||
timestampNs?: string | number | (Long & { | ||
high: number; | ||
low: number; | ||
unsigned: boolean; | ||
add: (addend: string | number | Long) => Long; | ||
and: (other: string | number | Long) => Long; | ||
compare: (other: string | number | Long) => number; | ||
comp: (other: string | number | Long) => number; | ||
divide: (divisor: string | number | Long) => Long; | ||
div: (divisor: string | number | Long) => Long; | ||
equals: (other: string | number | Long) => boolean; | ||
eq: (other: string | number | Long) => boolean; | ||
getHighBits: () => number; | ||
getHighBitsUnsigned: () => number; | ||
getLowBits: () => number; | ||
getLowBitsUnsigned: () => number; | ||
getNumBitsAbs: () => number; | ||
greaterThan: (other: string | number | Long) => boolean; | ||
gt: (other: string | number | Long) => boolean; | ||
greaterThanOrEqual: (other: string | number | Long) => boolean; | ||
gte: (other: string | number | Long) => boolean; | ||
ge: (other: string | number | Long) => boolean; | ||
isEven: () => boolean; | ||
isNegative: () => boolean; | ||
isOdd: () => boolean; | ||
isPositive: () => boolean; | ||
isZero: () => boolean; | ||
eqz: () => boolean; | ||
lessThan: (other: string | number | Long) => boolean; | ||
lt: (other: string | number | Long) => boolean; | ||
lessThanOrEqual: (other: string | number | Long) => boolean; | ||
lte: (other: string | number | Long) => boolean; | ||
le: (other: string | number | Long) => boolean; | ||
modulo: (other: string | number | Long) => Long; | ||
mod: (other: string | number | Long) => Long; | ||
rem: (other: string | number | Long) => Long; | ||
multiply: (multiplier: string | number | Long) => Long; | ||
mul: (multiplier: string | number | Long) => Long; | ||
negate: () => Long; | ||
neg: () => Long; | ||
not: () => Long; | ||
countLeadingZeros: () => number; | ||
clz: () => number; | ||
countTrailingZeros: () => number; | ||
ctz: () => number; | ||
notEquals: (other: string | number | Long) => boolean; | ||
neq: (other: string | number | Long) => boolean; | ||
ne: (other: string | number | Long) => boolean; | ||
or: (other: string | number | Long) => Long; | ||
shiftLeft: (numBits: number | Long) => Long; | ||
shl: (numBits: number | Long) => Long; | ||
shiftRight: (numBits: number | Long) => Long; | ||
shr: (numBits: number | Long) => Long; | ||
shiftRightUnsigned: (numBits: number | Long) => Long; | ||
shru: (numBits: number | Long) => Long; | ||
shr_u: (numBits: number | Long) => Long; | ||
rotateLeft: (numBits: number | Long) => Long; | ||
rotl: (numBits: number | Long) => Long; | ||
rotateRight: (numBits: number | Long) => Long; | ||
rotr: (numBits: number | Long) => Long; | ||
subtract: (subtrahend: string | number | Long) => Long; | ||
sub: (subtrahend: string | number | Long) => Long; | ||
toInt: () => number; | ||
toNumber: () => number; | ||
toBytes: (le?: boolean | undefined) => number[]; | ||
toBytesLE: () => number[]; | ||
toBytesBE: () => number[]; | ||
toSigned: () => Long; | ||
toString: (radix?: number | undefined) => string; | ||
toUnsigned: () => Long; | ||
xor: (other: string | number | Long) => Long; | ||
} & { [K in Exclude<keyof I["timestampNs"], keyof Long>]: never; }) | undefined; | ||
opaqueConversationIdentifier?: string | undefined; | ||
} & { [K_1 in Exclude<keyof I, keyof FrameActionBody>]: never; }>(object: I): FrameActionBody; | ||
}; | ||
@@ -54,0 +134,0 @@ export declare const FrameAction: { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1901432
30216