@bite-ninja/zenu-sdk 0.9.1 → 0.10.0

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.
@@ -52,6 +52,18 @@ export interface WhoAmIRequest {
52
52
  export interface WhoAmIResponse {
53
53
  user: User | undefined;
54
54
  }
55
+ export interface GetUserRequest {
56
+ userId: string;
57
+ }
58
+ export interface GetUserResponse {
59
+ user: User | undefined;
60
+ }
61
+ export interface GetUsersRequest {
62
+ userIds: string[];
63
+ }
64
+ export interface GetUsersResponse {
65
+ users: User[];
66
+ }
55
67
  export interface User {
56
68
  id: string;
57
69
  email: string;
@@ -62,6 +74,9 @@ export interface User {
62
74
  createdAt: Date | undefined;
63
75
  updatedAt: Date | undefined;
64
76
  roles: UserRole[];
77
+ stripeAccountId?: string | undefined;
78
+ stripeDetailsSubmitted: boolean;
79
+ stripePayoutsEnabled: boolean;
65
80
  }
66
81
  export interface UserRole {
67
82
  role: Role;
@@ -73,6 +88,10 @@ export declare const SayHelloRequest: MessageFns<SayHelloRequest>;
73
88
  export declare const SayHelloResponse: MessageFns<SayHelloResponse>;
74
89
  export declare const WhoAmIRequest: MessageFns<WhoAmIRequest>;
75
90
  export declare const WhoAmIResponse: MessageFns<WhoAmIResponse>;
91
+ export declare const GetUserRequest: MessageFns<GetUserRequest>;
92
+ export declare const GetUserResponse: MessageFns<GetUserResponse>;
93
+ export declare const GetUsersRequest: MessageFns<GetUsersRequest>;
94
+ export declare const GetUsersResponse: MessageFns<GetUsersResponse>;
76
95
  export declare const User: MessageFns<User>;
77
96
  export declare const UserRole: MessageFns<UserRole>;
78
97
  /** Users service. */
@@ -81,7 +100,7 @@ export declare const UsersServiceDefinition: {
81
100
  readonly name: "UsersService";
82
101
  readonly fullName: "zenu.users.v1.UsersService";
83
102
  readonly methods: {
84
- /** Test RPC for initial setup */
103
+ /** Test RPC for initial setup. */
85
104
  readonly sayHello: {
86
105
  readonly name: "SayHello";
87
106
  readonly requestType: MessageFns<SayHelloRequest>;
@@ -90,7 +109,7 @@ export declare const UsersServiceDefinition: {
90
109
  readonly responseStream: false;
91
110
  readonly options: {};
92
111
  };
93
- /** Get current authenticated user information */
112
+ /** Get current authenticated user information. */
94
113
  readonly whoAmI: {
95
114
  readonly name: "WhoAmI";
96
115
  readonly requestType: MessageFns<WhoAmIRequest>;
@@ -99,19 +118,57 @@ export declare const UsersServiceDefinition: {
99
118
  readonly responseStream: false;
100
119
  readonly options: {};
101
120
  };
121
+ /** Retrieve a single user. */
122
+ readonly getUser: {
123
+ readonly name: "GetUser";
124
+ readonly requestType: MessageFns<GetUserRequest>;
125
+ readonly requestStream: false;
126
+ readonly responseType: MessageFns<GetUserResponse>;
127
+ readonly responseStream: false;
128
+ readonly options: {};
129
+ };
130
+ /**
131
+ * Retrieve a list of users.
132
+ *
133
+ * Returns a partial list if some user_ids are not found.
134
+ */
135
+ readonly getUsers: {
136
+ readonly name: "GetUsers";
137
+ readonly requestType: MessageFns<GetUsersRequest>;
138
+ readonly requestStream: false;
139
+ readonly responseType: MessageFns<GetUsersResponse>;
140
+ readonly responseStream: false;
141
+ readonly options: {};
142
+ };
102
143
  };
103
144
  };
104
145
  export interface UsersServiceImplementation<CallContextExt = {}> {
105
- /** Test RPC for initial setup */
146
+ /** Test RPC for initial setup. */
106
147
  sayHello(request: SayHelloRequest, context: CallContext & CallContextExt): Promise<DeepPartial<SayHelloResponse>>;
107
- /** Get current authenticated user information */
148
+ /** Get current authenticated user information. */
108
149
  whoAmI(request: WhoAmIRequest, context: CallContext & CallContextExt): Promise<DeepPartial<WhoAmIResponse>>;
150
+ /** Retrieve a single user. */
151
+ getUser(request: GetUserRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetUserResponse>>;
152
+ /**
153
+ * Retrieve a list of users.
154
+ *
155
+ * Returns a partial list if some user_ids are not found.
156
+ */
157
+ getUsers(request: GetUsersRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetUsersResponse>>;
109
158
  }
110
159
  export interface UsersServiceClient<CallOptionsExt = {}> {
111
- /** Test RPC for initial setup */
160
+ /** Test RPC for initial setup. */
112
161
  sayHello(request: DeepPartial<SayHelloRequest>, options?: CallOptions & CallOptionsExt): Promise<SayHelloResponse>;
113
- /** Get current authenticated user information */
162
+ /** Get current authenticated user information. */
114
163
  whoAmI(request: DeepPartial<WhoAmIRequest>, options?: CallOptions & CallOptionsExt): Promise<WhoAmIResponse>;
164
+ /** Retrieve a single user. */
165
+ getUser(request: DeepPartial<GetUserRequest>, options?: CallOptions & CallOptionsExt): Promise<GetUserResponse>;
166
+ /**
167
+ * Retrieve a list of users.
168
+ *
169
+ * Returns a partial list if some user_ids are not found.
170
+ */
171
+ getUsers(request: DeepPartial<GetUsersRequest>, options?: CallOptions & CallOptionsExt): Promise<GetUsersResponse>;
115
172
  }
116
173
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
117
174
  type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
@@ -1 +1 @@
1
- {"version":3,"file":"users_service.d.ts","sourceRoot":"","sources":["../../../../../src/gen/zenu/users/v1/users_service.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGjE,eAAO,MAAM,SAAS;;;;;;CAAyF,CAAC;AAEhH,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEjE,yBAAiB,SAAS,CAAC;IACzB,KAAY,WAAW,GAAG,OAAO,SAAS,CAAC,WAAW,CAAC;IACvD,KAAY,MAAM,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;IAC7C,KAAY,YAAY,GAAG,OAAO,SAAS,CAAC,YAAY,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AAC,CAAC,CAAC,CAAC;CAAE,GACrD,OAAO,CAAC,CAAC,CAAC,CAAC;AAEf,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC;AACpD,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,GAC9C,CAAC,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK;CAAE,CAAC;AA4BnG,UAAU,UAAU,CAAC,CAAC;IACpB,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,YAAY,CAAC;IACxD,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IAC7D,QAAQ,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;IACzB,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;IAC5B,MAAM,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACxD,WAAW,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;CAC/D"}
package/dist/index.js CHANGED
@@ -5627,6 +5627,214 @@ var WhoAmIResponse = {
5627
5627
  return message;
5628
5628
  }
5629
5629
  };
5630
+ function createBaseGetUserRequest() {
5631
+ return { userId: "" };
5632
+ }
5633
+ var GetUserRequest = {
5634
+ encode(message, writer = new BinaryWriter) {
5635
+ if (message.userId !== "") {
5636
+ writer.uint32(10).string(message.userId);
5637
+ }
5638
+ return writer;
5639
+ },
5640
+ decode(input, length) {
5641
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5642
+ const end = length === undefined ? reader.len : reader.pos + length;
5643
+ const message = createBaseGetUserRequest();
5644
+ while (reader.pos < end) {
5645
+ const tag = reader.uint32();
5646
+ switch (tag >>> 3) {
5647
+ case 1: {
5648
+ if (tag !== 10) {
5649
+ break;
5650
+ }
5651
+ message.userId = reader.string();
5652
+ continue;
5653
+ }
5654
+ }
5655
+ if ((tag & 7) === 4 || tag === 0) {
5656
+ break;
5657
+ }
5658
+ reader.skip(tag & 7);
5659
+ }
5660
+ return message;
5661
+ },
5662
+ fromJSON(object) {
5663
+ return {
5664
+ userId: isSet4(object.userId) ? globalThis.String(object.userId) : isSet4(object.user_id) ? globalThis.String(object.user_id) : ""
5665
+ };
5666
+ },
5667
+ toJSON(message) {
5668
+ const obj = {};
5669
+ if (message.userId !== "") {
5670
+ obj.userId = message.userId;
5671
+ }
5672
+ return obj;
5673
+ },
5674
+ create(base) {
5675
+ return GetUserRequest.fromPartial(base ?? {});
5676
+ },
5677
+ fromPartial(object) {
5678
+ const message = createBaseGetUserRequest();
5679
+ message.userId = object.userId ?? "";
5680
+ return message;
5681
+ }
5682
+ };
5683
+ function createBaseGetUserResponse() {
5684
+ return { user: undefined };
5685
+ }
5686
+ var GetUserResponse = {
5687
+ encode(message, writer = new BinaryWriter) {
5688
+ if (message.user !== undefined) {
5689
+ User.encode(message.user, writer.uint32(10).fork()).join();
5690
+ }
5691
+ return writer;
5692
+ },
5693
+ decode(input, length) {
5694
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5695
+ const end = length === undefined ? reader.len : reader.pos + length;
5696
+ const message = createBaseGetUserResponse();
5697
+ while (reader.pos < end) {
5698
+ const tag = reader.uint32();
5699
+ switch (tag >>> 3) {
5700
+ case 1: {
5701
+ if (tag !== 10) {
5702
+ break;
5703
+ }
5704
+ message.user = User.decode(reader, reader.uint32());
5705
+ continue;
5706
+ }
5707
+ }
5708
+ if ((tag & 7) === 4 || tag === 0) {
5709
+ break;
5710
+ }
5711
+ reader.skip(tag & 7);
5712
+ }
5713
+ return message;
5714
+ },
5715
+ fromJSON(object) {
5716
+ return { user: isSet4(object.user) ? User.fromJSON(object.user) : undefined };
5717
+ },
5718
+ toJSON(message) {
5719
+ const obj = {};
5720
+ if (message.user !== undefined) {
5721
+ obj.user = User.toJSON(message.user);
5722
+ }
5723
+ return obj;
5724
+ },
5725
+ create(base) {
5726
+ return GetUserResponse.fromPartial(base ?? {});
5727
+ },
5728
+ fromPartial(object) {
5729
+ const message = createBaseGetUserResponse();
5730
+ message.user = object.user !== undefined && object.user !== null ? User.fromPartial(object.user) : undefined;
5731
+ return message;
5732
+ }
5733
+ };
5734
+ function createBaseGetUsersRequest() {
5735
+ return { userIds: [] };
5736
+ }
5737
+ var GetUsersRequest = {
5738
+ encode(message, writer = new BinaryWriter) {
5739
+ for (const v of message.userIds) {
5740
+ writer.uint32(10).string(v);
5741
+ }
5742
+ return writer;
5743
+ },
5744
+ decode(input, length) {
5745
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5746
+ const end = length === undefined ? reader.len : reader.pos + length;
5747
+ const message = createBaseGetUsersRequest();
5748
+ while (reader.pos < end) {
5749
+ const tag = reader.uint32();
5750
+ switch (tag >>> 3) {
5751
+ case 1: {
5752
+ if (tag !== 10) {
5753
+ break;
5754
+ }
5755
+ message.userIds.push(reader.string());
5756
+ continue;
5757
+ }
5758
+ }
5759
+ if ((tag & 7) === 4 || tag === 0) {
5760
+ break;
5761
+ }
5762
+ reader.skip(tag & 7);
5763
+ }
5764
+ return message;
5765
+ },
5766
+ fromJSON(object) {
5767
+ return {
5768
+ userIds: globalThis.Array.isArray(object?.userIds) ? object.userIds.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : []
5769
+ };
5770
+ },
5771
+ toJSON(message) {
5772
+ const obj = {};
5773
+ if (message.userIds?.length) {
5774
+ obj.userIds = message.userIds;
5775
+ }
5776
+ return obj;
5777
+ },
5778
+ create(base) {
5779
+ return GetUsersRequest.fromPartial(base ?? {});
5780
+ },
5781
+ fromPartial(object) {
5782
+ const message = createBaseGetUsersRequest();
5783
+ message.userIds = object.userIds?.map((e) => e) || [];
5784
+ return message;
5785
+ }
5786
+ };
5787
+ function createBaseGetUsersResponse() {
5788
+ return { users: [] };
5789
+ }
5790
+ var GetUsersResponse = {
5791
+ encode(message, writer = new BinaryWriter) {
5792
+ for (const v of message.users) {
5793
+ User.encode(v, writer.uint32(10).fork()).join();
5794
+ }
5795
+ return writer;
5796
+ },
5797
+ decode(input, length) {
5798
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5799
+ const end = length === undefined ? reader.len : reader.pos + length;
5800
+ const message = createBaseGetUsersResponse();
5801
+ while (reader.pos < end) {
5802
+ const tag = reader.uint32();
5803
+ switch (tag >>> 3) {
5804
+ case 1: {
5805
+ if (tag !== 10) {
5806
+ break;
5807
+ }
5808
+ message.users.push(User.decode(reader, reader.uint32()));
5809
+ continue;
5810
+ }
5811
+ }
5812
+ if ((tag & 7) === 4 || tag === 0) {
5813
+ break;
5814
+ }
5815
+ reader.skip(tag & 7);
5816
+ }
5817
+ return message;
5818
+ },
5819
+ fromJSON(object) {
5820
+ return { users: globalThis.Array.isArray(object?.users) ? object.users.map((e) => User.fromJSON(e)) : [] };
5821
+ },
5822
+ toJSON(message) {
5823
+ const obj = {};
5824
+ if (message.users?.length) {
5825
+ obj.users = message.users.map((e) => User.toJSON(e));
5826
+ }
5827
+ return obj;
5828
+ },
5829
+ create(base) {
5830
+ return GetUsersResponse.fromPartial(base ?? {});
5831
+ },
5832
+ fromPartial(object) {
5833
+ const message = createBaseGetUsersResponse();
5834
+ message.users = object.users?.map((e) => User.fromPartial(e)) || [];
5835
+ return message;
5836
+ }
5837
+ };
5630
5838
  function createBaseUser() {
5631
5839
  return {
5632
5840
  id: "",
@@ -5637,7 +5845,10 @@ function createBaseUser() {
5637
5845
  image: "",
5638
5846
  createdAt: undefined,
5639
5847
  updatedAt: undefined,
5640
- roles: []
5848
+ roles: [],
5849
+ stripeAccountId: undefined,
5850
+ stripeDetailsSubmitted: false,
5851
+ stripePayoutsEnabled: false
5641
5852
  };
5642
5853
  }
5643
5854
  var User = {
@@ -5669,6 +5880,15 @@ var User = {
5669
5880
  for (const v of message.roles) {
5670
5881
  UserRole.encode(v, writer.uint32(74).fork()).join();
5671
5882
  }
5883
+ if (message.stripeAccountId !== undefined) {
5884
+ writer.uint32(82).string(message.stripeAccountId);
5885
+ }
5886
+ if (message.stripeDetailsSubmitted !== false) {
5887
+ writer.uint32(88).bool(message.stripeDetailsSubmitted);
5888
+ }
5889
+ if (message.stripePayoutsEnabled !== false) {
5890
+ writer.uint32(96).bool(message.stripePayoutsEnabled);
5891
+ }
5672
5892
  return writer;
5673
5893
  },
5674
5894
  decode(input, length) {
@@ -5741,6 +5961,27 @@ var User = {
5741
5961
  message.roles.push(UserRole.decode(reader, reader.uint32()));
5742
5962
  continue;
5743
5963
  }
5964
+ case 10: {
5965
+ if (tag !== 82) {
5966
+ break;
5967
+ }
5968
+ message.stripeAccountId = reader.string();
5969
+ continue;
5970
+ }
5971
+ case 11: {
5972
+ if (tag !== 88) {
5973
+ break;
5974
+ }
5975
+ message.stripeDetailsSubmitted = reader.bool();
5976
+ continue;
5977
+ }
5978
+ case 12: {
5979
+ if (tag !== 96) {
5980
+ break;
5981
+ }
5982
+ message.stripePayoutsEnabled = reader.bool();
5983
+ continue;
5984
+ }
5744
5985
  }
5745
5986
  if ((tag & 7) === 4 || tag === 0) {
5746
5987
  break;
@@ -5759,7 +6000,10 @@ var User = {
5759
6000
  image: isSet4(object.image) ? globalThis.String(object.image) : "",
5760
6001
  createdAt: isSet4(object.createdAt) ? fromJsonTimestamp3(object.createdAt) : isSet4(object.created_at) ? fromJsonTimestamp3(object.created_at) : undefined,
5761
6002
  updatedAt: isSet4(object.updatedAt) ? fromJsonTimestamp3(object.updatedAt) : isSet4(object.updated_at) ? fromJsonTimestamp3(object.updated_at) : undefined,
5762
- roles: globalThis.Array.isArray(object?.roles) ? object.roles.map((e) => UserRole.fromJSON(e)) : []
6003
+ roles: globalThis.Array.isArray(object?.roles) ? object.roles.map((e) => UserRole.fromJSON(e)) : [],
6004
+ stripeAccountId: isSet4(object.stripeAccountId) ? globalThis.String(object.stripeAccountId) : isSet4(object.stripe_account_id) ? globalThis.String(object.stripe_account_id) : undefined,
6005
+ stripeDetailsSubmitted: isSet4(object.stripeDetailsSubmitted) ? globalThis.Boolean(object.stripeDetailsSubmitted) : isSet4(object.stripe_details_submitted) ? globalThis.Boolean(object.stripe_details_submitted) : false,
6006
+ stripePayoutsEnabled: isSet4(object.stripePayoutsEnabled) ? globalThis.Boolean(object.stripePayoutsEnabled) : isSet4(object.stripe_payouts_enabled) ? globalThis.Boolean(object.stripe_payouts_enabled) : false
5763
6007
  };
5764
6008
  },
5765
6009
  toJSON(message) {
@@ -5791,6 +6035,15 @@ var User = {
5791
6035
  if (message.roles?.length) {
5792
6036
  obj.roles = message.roles.map((e) => UserRole.toJSON(e));
5793
6037
  }
6038
+ if (message.stripeAccountId !== undefined) {
6039
+ obj.stripeAccountId = message.stripeAccountId;
6040
+ }
6041
+ if (message.stripeDetailsSubmitted !== false) {
6042
+ obj.stripeDetailsSubmitted = message.stripeDetailsSubmitted;
6043
+ }
6044
+ if (message.stripePayoutsEnabled !== false) {
6045
+ obj.stripePayoutsEnabled = message.stripePayoutsEnabled;
6046
+ }
5794
6047
  return obj;
5795
6048
  },
5796
6049
  create(base) {
@@ -5807,6 +6060,9 @@ var User = {
5807
6060
  message.createdAt = object.createdAt ?? undefined;
5808
6061
  message.updatedAt = object.updatedAt ?? undefined;
5809
6062
  message.roles = object.roles?.map((e) => UserRole.fromPartial(e)) || [];
6063
+ message.stripeAccountId = object.stripeAccountId ?? undefined;
6064
+ message.stripeDetailsSubmitted = object.stripeDetailsSubmitted ?? false;
6065
+ message.stripePayoutsEnabled = object.stripePayoutsEnabled ?? false;
5810
6066
  return message;
5811
6067
  }
5812
6068
  };
@@ -5927,6 +6183,22 @@ var UsersServiceDefinition = {
5927
6183
  responseType: WhoAmIResponse,
5928
6184
  responseStream: false,
5929
6185
  options: {}
6186
+ },
6187
+ getUser: {
6188
+ name: "GetUser",
6189
+ requestType: GetUserRequest,
6190
+ requestStream: false,
6191
+ responseType: GetUserResponse,
6192
+ responseStream: false,
6193
+ options: {}
6194
+ },
6195
+ getUsers: {
6196
+ name: "GetUsers",
6197
+ requestType: GetUsersRequest,
6198
+ requestStream: false,
6199
+ responseType: GetUsersResponse,
6200
+ responseStream: false,
6201
+ options: {}
5930
6202
  }
5931
6203
  }
5932
6204
  };
@@ -7442,6 +7714,10 @@ export {
7442
7714
  ListAgreementsRequest,
7443
7715
  ListAgreementVersionsResponse,
7444
7716
  ListAgreementVersionsRequest,
7717
+ GetUsersResponse,
7718
+ GetUsersRequest,
7719
+ GetUserResponse,
7720
+ GetUserRequest,
7445
7721
  GetNinjaOnboardingApplicationResponse,
7446
7722
  GetNinjaOnboardingApplicationRequest,
7447
7723
  GetAgreementVersionResponse,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bite-ninja/zenu-sdk",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "generate": "buf generate ../../protos",