@sentio/protos 3.0.0-rc.7 → 3.0.0-rc.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/protos",
3
- "version": "3.0.0-rc.7",
3
+ "version": "3.0.0-rc.9",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1052,6 +1052,7 @@ export interface EntityUpdateData_FieldsEntry {
1052
1052
 
1053
1053
  export interface TPLRequest {
1054
1054
  templates: TemplateInstance[];
1055
+ remove: boolean;
1055
1056
  }
1056
1057
 
1057
1058
  export interface TSRequest {
@@ -8642,7 +8643,7 @@ export const EntityUpdateData_FieldsEntry = {
8642
8643
  };
8643
8644
 
8644
8645
  function createBaseTPLRequest(): TPLRequest {
8645
- return { templates: [] };
8646
+ return { templates: [], remove: false };
8646
8647
  }
8647
8648
 
8648
8649
  export const TPLRequest = {
@@ -8650,6 +8651,9 @@ export const TPLRequest = {
8650
8651
  for (const v of message.templates) {
8651
8652
  TemplateInstance.encode(v!, writer.uint32(10).fork()).ldelim();
8652
8653
  }
8654
+ if (message.remove !== false) {
8655
+ writer.uint32(16).bool(message.remove);
8656
+ }
8653
8657
  return writer;
8654
8658
  },
8655
8659
 
@@ -8667,6 +8671,13 @@ export const TPLRequest = {
8667
8671
 
8668
8672
  message.templates.push(TemplateInstance.decode(reader, reader.uint32()));
8669
8673
  continue;
8674
+ case 2:
8675
+ if (tag !== 16) {
8676
+ break;
8677
+ }
8678
+
8679
+ message.remove = reader.bool();
8680
+ continue;
8670
8681
  }
8671
8682
  if ((tag & 7) === 4 || tag === 0) {
8672
8683
  break;
@@ -8681,6 +8692,7 @@ export const TPLRequest = {
8681
8692
  templates: globalThis.Array.isArray(object?.templates)
8682
8693
  ? object.templates.map((e: any) => TemplateInstance.fromJSON(e))
8683
8694
  : [],
8695
+ remove: isSet(object.remove) ? globalThis.Boolean(object.remove) : false,
8684
8696
  };
8685
8697
  },
8686
8698
 
@@ -8689,6 +8701,9 @@ export const TPLRequest = {
8689
8701
  if (message.templates?.length) {
8690
8702
  obj.templates = message.templates.map((e) => TemplateInstance.toJSON(e));
8691
8703
  }
8704
+ if (message.remove !== false) {
8705
+ obj.remove = message.remove;
8706
+ }
8692
8707
  return obj;
8693
8708
  },
8694
8709
 
@@ -8698,6 +8713,7 @@ export const TPLRequest = {
8698
8713
  fromPartial(object: DeepPartial<TPLRequest>): TPLRequest {
8699
8714
  const message = createBaseTPLRequest();
8700
8715
  message.templates = object.templates?.map((e) => TemplateInstance.fromPartial(e)) || [];
8716
+ message.remove = object.remove ?? false;
8701
8717
  return message;
8702
8718
  },
8703
8719
  };
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable */
2
2
  import Long from "long";
3
3
  import _m0 from "protobufjs/minimal.js";
4
- import { Struct } from "../../../google/protobuf/struct.js";
4
+ import { ListValue, Struct } from "../../../google/protobuf/struct.js";
5
5
  import { Timestamp } from "../../../google/protobuf/timestamp.js";
6
6
  import { Money } from "../../../google/type/money.js";
7
7
 
@@ -311,6 +311,45 @@ export function notificationTypeToJSON(object: NotificationType): string {
311
311
  }
312
312
  }
313
313
 
314
+ export enum ChatType {
315
+ CHAT_TYPE_UNSPECIFIED = 0,
316
+ CHAT_TYPE_CHAT = 1,
317
+ CHAT_TYPE_ACTION = 2,
318
+ UNRECOGNIZED = -1,
319
+ }
320
+
321
+ export function chatTypeFromJSON(object: any): ChatType {
322
+ switch (object) {
323
+ case 0:
324
+ case "CHAT_TYPE_UNSPECIFIED":
325
+ return ChatType.CHAT_TYPE_UNSPECIFIED;
326
+ case 1:
327
+ case "CHAT_TYPE_CHAT":
328
+ return ChatType.CHAT_TYPE_CHAT;
329
+ case 2:
330
+ case "CHAT_TYPE_ACTION":
331
+ return ChatType.CHAT_TYPE_ACTION;
332
+ case -1:
333
+ case "UNRECOGNIZED":
334
+ default:
335
+ return ChatType.UNRECOGNIZED;
336
+ }
337
+ }
338
+
339
+ export function chatTypeToJSON(object: ChatType): string {
340
+ switch (object) {
341
+ case ChatType.CHAT_TYPE_UNSPECIFIED:
342
+ return "CHAT_TYPE_UNSPECIFIED";
343
+ case ChatType.CHAT_TYPE_CHAT:
344
+ return "CHAT_TYPE_CHAT";
345
+ case ChatType.CHAT_TYPE_ACTION:
346
+ return "CHAT_TYPE_ACTION";
347
+ case ChatType.UNRECOGNIZED:
348
+ default:
349
+ return "UNRECOGNIZED";
350
+ }
351
+ }
352
+
314
353
  export interface UsageTracker {
315
354
  apiSku: string;
316
355
  webuiSku: string;
@@ -412,6 +451,8 @@ export interface User {
412
451
  accountStatus: User_AccountStatus;
413
452
  tier: Tier;
414
453
  isOrganization: boolean;
454
+ walletAddress: string;
455
+ identities: string[];
415
456
  }
416
457
 
417
458
  export enum User_AccountStatus {
@@ -2050,6 +2091,23 @@ export interface RequestLog {
2050
2091
  chainId: string;
2051
2092
  }
2052
2093
 
2094
+ export interface HistoryChat {
2095
+ id: string;
2096
+ title: string;
2097
+ messages: Array<any> | undefined;
2098
+ type: ChatType;
2099
+ meta: { [key: string]: any } | undefined;
2100
+ createdAt: Date | undefined;
2101
+ updatedAt: Date | undefined;
2102
+ projectOwner?: string | undefined;
2103
+ projectSlug?: string | undefined;
2104
+ }
2105
+
2106
+ export interface ProjectOwnerAndSlug {
2107
+ ownerName: string;
2108
+ slug: string;
2109
+ }
2110
+
2053
2111
  function createBaseUsageTracker(): UsageTracker {
2054
2112
  return {
2055
2113
  apiSku: "",
@@ -2796,6 +2854,8 @@ function createBaseUser(): User {
2796
2854
  accountStatus: 0,
2797
2855
  tier: 0,
2798
2856
  isOrganization: false,
2857
+ walletAddress: "",
2858
+ identities: [],
2799
2859
  };
2800
2860
  }
2801
2861
 
@@ -2852,6 +2912,12 @@ export const User = {
2852
2912
  if (message.isOrganization !== false) {
2853
2913
  writer.uint32(128).bool(message.isOrganization);
2854
2914
  }
2915
+ if (message.walletAddress !== "") {
2916
+ writer.uint32(138).string(message.walletAddress);
2917
+ }
2918
+ for (const v of message.identities) {
2919
+ writer.uint32(146).string(v!);
2920
+ }
2855
2921
  return writer;
2856
2922
  },
2857
2923
 
@@ -2967,6 +3033,20 @@ export const User = {
2967
3033
 
2968
3034
  message.isOrganization = reader.bool();
2969
3035
  continue;
3036
+ case 17:
3037
+ if (tag !== 138) {
3038
+ break;
3039
+ }
3040
+
3041
+ message.walletAddress = reader.string();
3042
+ continue;
3043
+ case 18:
3044
+ if (tag !== 146) {
3045
+ break;
3046
+ }
3047
+
3048
+ message.identities.push(reader.string());
3049
+ continue;
2970
3050
  }
2971
3051
  if ((tag & 7) === 4 || tag === 0) {
2972
3052
  break;
@@ -2993,6 +3073,10 @@ export const User = {
2993
3073
  accountStatus: isSet(object.accountStatus) ? user_AccountStatusFromJSON(object.accountStatus) : 0,
2994
3074
  tier: isSet(object.tier) ? tierFromJSON(object.tier) : 0,
2995
3075
  isOrganization: isSet(object.isOrganization) ? globalThis.Boolean(object.isOrganization) : false,
3076
+ walletAddress: isSet(object.walletAddress) ? globalThis.String(object.walletAddress) : "",
3077
+ identities: globalThis.Array.isArray(object?.identities)
3078
+ ? object.identities.map((e: any) => globalThis.String(e))
3079
+ : [],
2996
3080
  };
2997
3081
  },
2998
3082
 
@@ -3043,6 +3127,12 @@ export const User = {
3043
3127
  if (message.isOrganization !== false) {
3044
3128
  obj.isOrganization = message.isOrganization;
3045
3129
  }
3130
+ if (message.walletAddress !== "") {
3131
+ obj.walletAddress = message.walletAddress;
3132
+ }
3133
+ if (message.identities?.length) {
3134
+ obj.identities = message.identities;
3135
+ }
3046
3136
  return obj;
3047
3137
  },
3048
3138
 
@@ -3066,6 +3156,8 @@ export const User = {
3066
3156
  message.accountStatus = object.accountStatus ?? 0;
3067
3157
  message.tier = object.tier ?? 0;
3068
3158
  message.isOrganization = object.isOrganization ?? false;
3159
+ message.walletAddress = object.walletAddress ?? "";
3160
+ message.identities = object.identities?.map((e) => e) || [];
3069
3161
  return message;
3070
3162
  },
3071
3163
  };
@@ -14695,6 +14787,269 @@ export const RequestLog = {
14695
14787
  },
14696
14788
  };
14697
14789
 
14790
+ function createBaseHistoryChat(): HistoryChat {
14791
+ return {
14792
+ id: "",
14793
+ title: "",
14794
+ messages: undefined,
14795
+ type: 0,
14796
+ meta: undefined,
14797
+ createdAt: undefined,
14798
+ updatedAt: undefined,
14799
+ projectOwner: undefined,
14800
+ projectSlug: undefined,
14801
+ };
14802
+ }
14803
+
14804
+ export const HistoryChat = {
14805
+ encode(message: HistoryChat, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
14806
+ if (message.id !== "") {
14807
+ writer.uint32(10).string(message.id);
14808
+ }
14809
+ if (message.title !== "") {
14810
+ writer.uint32(18).string(message.title);
14811
+ }
14812
+ if (message.messages !== undefined) {
14813
+ ListValue.encode(ListValue.wrap(message.messages), writer.uint32(34).fork()).ldelim();
14814
+ }
14815
+ if (message.type !== 0) {
14816
+ writer.uint32(40).int32(message.type);
14817
+ }
14818
+ if (message.meta !== undefined) {
14819
+ Struct.encode(Struct.wrap(message.meta), writer.uint32(50).fork()).ldelim();
14820
+ }
14821
+ if (message.createdAt !== undefined) {
14822
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(58).fork()).ldelim();
14823
+ }
14824
+ if (message.updatedAt !== undefined) {
14825
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(66).fork()).ldelim();
14826
+ }
14827
+ if (message.projectOwner !== undefined) {
14828
+ writer.uint32(74).string(message.projectOwner);
14829
+ }
14830
+ if (message.projectSlug !== undefined) {
14831
+ writer.uint32(82).string(message.projectSlug);
14832
+ }
14833
+ return writer;
14834
+ },
14835
+
14836
+ decode(input: _m0.Reader | Uint8Array, length?: number): HistoryChat {
14837
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
14838
+ let end = length === undefined ? reader.len : reader.pos + length;
14839
+ const message = createBaseHistoryChat();
14840
+ while (reader.pos < end) {
14841
+ const tag = reader.uint32();
14842
+ switch (tag >>> 3) {
14843
+ case 1:
14844
+ if (tag !== 10) {
14845
+ break;
14846
+ }
14847
+
14848
+ message.id = reader.string();
14849
+ continue;
14850
+ case 2:
14851
+ if (tag !== 18) {
14852
+ break;
14853
+ }
14854
+
14855
+ message.title = reader.string();
14856
+ continue;
14857
+ case 4:
14858
+ if (tag !== 34) {
14859
+ break;
14860
+ }
14861
+
14862
+ message.messages = ListValue.unwrap(ListValue.decode(reader, reader.uint32()));
14863
+ continue;
14864
+ case 5:
14865
+ if (tag !== 40) {
14866
+ break;
14867
+ }
14868
+
14869
+ message.type = reader.int32() as any;
14870
+ continue;
14871
+ case 6:
14872
+ if (tag !== 50) {
14873
+ break;
14874
+ }
14875
+
14876
+ message.meta = Struct.unwrap(Struct.decode(reader, reader.uint32()));
14877
+ continue;
14878
+ case 7:
14879
+ if (tag !== 58) {
14880
+ break;
14881
+ }
14882
+
14883
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
14884
+ continue;
14885
+ case 8:
14886
+ if (tag !== 66) {
14887
+ break;
14888
+ }
14889
+
14890
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
14891
+ continue;
14892
+ case 9:
14893
+ if (tag !== 74) {
14894
+ break;
14895
+ }
14896
+
14897
+ message.projectOwner = reader.string();
14898
+ continue;
14899
+ case 10:
14900
+ if (tag !== 82) {
14901
+ break;
14902
+ }
14903
+
14904
+ message.projectSlug = reader.string();
14905
+ continue;
14906
+ }
14907
+ if ((tag & 7) === 4 || tag === 0) {
14908
+ break;
14909
+ }
14910
+ reader.skipType(tag & 7);
14911
+ }
14912
+ return message;
14913
+ },
14914
+
14915
+ fromJSON(object: any): HistoryChat {
14916
+ return {
14917
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
14918
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
14919
+ messages: globalThis.Array.isArray(object.messages) ? [...object.messages] : undefined,
14920
+ type: isSet(object.type) ? chatTypeFromJSON(object.type) : 0,
14921
+ meta: isObject(object.meta) ? object.meta : undefined,
14922
+ createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
14923
+ updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
14924
+ projectOwner: isSet(object.projectOwner) ? globalThis.String(object.projectOwner) : undefined,
14925
+ projectSlug: isSet(object.projectSlug) ? globalThis.String(object.projectSlug) : undefined,
14926
+ };
14927
+ },
14928
+
14929
+ toJSON(message: HistoryChat): unknown {
14930
+ const obj: any = {};
14931
+ if (message.id !== "") {
14932
+ obj.id = message.id;
14933
+ }
14934
+ if (message.title !== "") {
14935
+ obj.title = message.title;
14936
+ }
14937
+ if (message.messages !== undefined) {
14938
+ obj.messages = message.messages;
14939
+ }
14940
+ if (message.type !== 0) {
14941
+ obj.type = chatTypeToJSON(message.type);
14942
+ }
14943
+ if (message.meta !== undefined) {
14944
+ obj.meta = message.meta;
14945
+ }
14946
+ if (message.createdAt !== undefined) {
14947
+ obj.createdAt = message.createdAt.toISOString();
14948
+ }
14949
+ if (message.updatedAt !== undefined) {
14950
+ obj.updatedAt = message.updatedAt.toISOString();
14951
+ }
14952
+ if (message.projectOwner !== undefined) {
14953
+ obj.projectOwner = message.projectOwner;
14954
+ }
14955
+ if (message.projectSlug !== undefined) {
14956
+ obj.projectSlug = message.projectSlug;
14957
+ }
14958
+ return obj;
14959
+ },
14960
+
14961
+ create(base?: DeepPartial<HistoryChat>): HistoryChat {
14962
+ return HistoryChat.fromPartial(base ?? {});
14963
+ },
14964
+ fromPartial(object: DeepPartial<HistoryChat>): HistoryChat {
14965
+ const message = createBaseHistoryChat();
14966
+ message.id = object.id ?? "";
14967
+ message.title = object.title ?? "";
14968
+ message.messages = object.messages ?? undefined;
14969
+ message.type = object.type ?? 0;
14970
+ message.meta = object.meta ?? undefined;
14971
+ message.createdAt = object.createdAt ?? undefined;
14972
+ message.updatedAt = object.updatedAt ?? undefined;
14973
+ message.projectOwner = object.projectOwner ?? undefined;
14974
+ message.projectSlug = object.projectSlug ?? undefined;
14975
+ return message;
14976
+ },
14977
+ };
14978
+
14979
+ function createBaseProjectOwnerAndSlug(): ProjectOwnerAndSlug {
14980
+ return { ownerName: "", slug: "" };
14981
+ }
14982
+
14983
+ export const ProjectOwnerAndSlug = {
14984
+ encode(message: ProjectOwnerAndSlug, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
14985
+ if (message.ownerName !== "") {
14986
+ writer.uint32(10).string(message.ownerName);
14987
+ }
14988
+ if (message.slug !== "") {
14989
+ writer.uint32(18).string(message.slug);
14990
+ }
14991
+ return writer;
14992
+ },
14993
+
14994
+ decode(input: _m0.Reader | Uint8Array, length?: number): ProjectOwnerAndSlug {
14995
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
14996
+ let end = length === undefined ? reader.len : reader.pos + length;
14997
+ const message = createBaseProjectOwnerAndSlug();
14998
+ while (reader.pos < end) {
14999
+ const tag = reader.uint32();
15000
+ switch (tag >>> 3) {
15001
+ case 1:
15002
+ if (tag !== 10) {
15003
+ break;
15004
+ }
15005
+
15006
+ message.ownerName = reader.string();
15007
+ continue;
15008
+ case 2:
15009
+ if (tag !== 18) {
15010
+ break;
15011
+ }
15012
+
15013
+ message.slug = reader.string();
15014
+ continue;
15015
+ }
15016
+ if ((tag & 7) === 4 || tag === 0) {
15017
+ break;
15018
+ }
15019
+ reader.skipType(tag & 7);
15020
+ }
15021
+ return message;
15022
+ },
15023
+
15024
+ fromJSON(object: any): ProjectOwnerAndSlug {
15025
+ return {
15026
+ ownerName: isSet(object.ownerName) ? globalThis.String(object.ownerName) : "",
15027
+ slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
15028
+ };
15029
+ },
15030
+
15031
+ toJSON(message: ProjectOwnerAndSlug): unknown {
15032
+ const obj: any = {};
15033
+ if (message.ownerName !== "") {
15034
+ obj.ownerName = message.ownerName;
15035
+ }
15036
+ if (message.slug !== "") {
15037
+ obj.slug = message.slug;
15038
+ }
15039
+ return obj;
15040
+ },
15041
+
15042
+ create(base?: DeepPartial<ProjectOwnerAndSlug>): ProjectOwnerAndSlug {
15043
+ return ProjectOwnerAndSlug.fromPartial(base ?? {});
15044
+ },
15045
+ fromPartial(object: DeepPartial<ProjectOwnerAndSlug>): ProjectOwnerAndSlug {
15046
+ const message = createBaseProjectOwnerAndSlug();
15047
+ message.ownerName = object.ownerName ?? "";
15048
+ message.slug = object.slug ?? "";
15049
+ return message;
15050
+ },
15051
+ };
15052
+
14698
15053
  function bytesFromBase64(b64: string): Uint8Array {
14699
15054
  if ((globalThis as any).Buffer) {
14700
15055
  return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));