@uniswap/client-platform-service 0.0.28 → 0.0.30

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.
@@ -310,6 +310,12 @@ export declare class Criterion extends Message<Criterion> {
310
310
  */
311
311
  value: EffectiveTime;
312
312
  case: "effectiveTime";
313
+ } | {
314
+ /**
315
+ * @generated from field: uniswap.platformservice.v1.NewUserOnly new_user_only = 5;
316
+ */
317
+ value: NewUserOnly;
318
+ case: "newUserOnly";
313
319
  } | {
314
320
  case: undefined;
315
321
  value?: undefined;
@@ -323,6 +329,28 @@ export declare class Criterion extends Message<Criterion> {
323
329
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Criterion;
324
330
  static equals(a: Criterion | PlainMessage<Criterion> | undefined, b: Criterion | PlainMessage<Criterion> | undefined): boolean;
325
331
  }
332
+ /**
333
+ * Restricts a campaign to new users: wallets with zero lifetime swaps at the
334
+ * time of their first sponsored swap. Evaluation is sticky — a wallet with
335
+ * any sponsorship already recorded under this campaign qualified at its
336
+ * first sponsored swap, so later swaps under the per-wallet cap keep
337
+ * matching. Otherwise the wallet must have zero lifetime swaps across all
338
+ * chains (wallet_swaps ClickHouse rollup: tx sender or output recipient of
339
+ * any v2/v3/v4 swap). A wallet whose first swap happened outside
340
+ * sponsorship never qualifies.
341
+ *
342
+ * @generated from message uniswap.platformservice.v1.NewUserOnly
343
+ */
344
+ export declare class NewUserOnly extends Message<NewUserOnly> {
345
+ constructor(data?: PartialMessage<NewUserOnly>);
346
+ static readonly runtime: typeof proto3;
347
+ static readonly typeName = "uniswap.platformservice.v1.NewUserOnly";
348
+ static readonly fields: FieldList;
349
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): NewUserOnly;
350
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): NewUserOnly;
351
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): NewUserOnly;
352
+ static equals(a: NewUserOnly | PlainMessage<NewUserOnly> | undefined, b: NewUserOnly | PlainMessage<NewUserOnly> | undefined): boolean;
353
+ }
326
354
  /**
327
355
  * Matches same-chain classic swaps and wrap/unwrap operations on the listed chains.
328
356
  * Cross-chain bridges never match.
@@ -388,7 +388,41 @@ Criterion.fields = proto3.util.newFieldList(() => [
388
388
  { no: 2, name: "always_reject", kind: "message", T: AlwaysReject, oneof: "criterion" },
389
389
  { no: 3, name: "max_sponsees_per_wallet", kind: "message", T: MaxSponseesPerWallet, oneof: "criterion" },
390
390
  { no: 4, name: "effective_time", kind: "message", T: EffectiveTime, oneof: "criterion" },
391
+ { no: 5, name: "new_user_only", kind: "message", T: NewUserOnly, oneof: "criterion" },
391
392
  ]);
393
+ /**
394
+ * Restricts a campaign to new users: wallets with zero lifetime swaps at the
395
+ * time of their first sponsored swap. Evaluation is sticky — a wallet with
396
+ * any sponsorship already recorded under this campaign qualified at its
397
+ * first sponsored swap, so later swaps under the per-wallet cap keep
398
+ * matching. Otherwise the wallet must have zero lifetime swaps across all
399
+ * chains (wallet_swaps ClickHouse rollup: tx sender or output recipient of
400
+ * any v2/v3/v4 swap). A wallet whose first swap happened outside
401
+ * sponsorship never qualifies.
402
+ *
403
+ * @generated from message uniswap.platformservice.v1.NewUserOnly
404
+ */
405
+ export class NewUserOnly extends Message {
406
+ constructor(data) {
407
+ super();
408
+ proto3.util.initPartial(data, this);
409
+ }
410
+ static fromBinary(bytes, options) {
411
+ return new NewUserOnly().fromBinary(bytes, options);
412
+ }
413
+ static fromJson(jsonValue, options) {
414
+ return new NewUserOnly().fromJson(jsonValue, options);
415
+ }
416
+ static fromJsonString(jsonString, options) {
417
+ return new NewUserOnly().fromJsonString(jsonString, options);
418
+ }
419
+ static equals(a, b) {
420
+ return proto3.util.equals(NewUserOnly, a, b);
421
+ }
422
+ }
423
+ NewUserOnly.runtime = proto3;
424
+ NewUserOnly.typeName = "uniswap.platformservice.v1.NewUserOnly";
425
+ NewUserOnly.fields = proto3.util.newFieldList(() => []);
392
426
  /**
393
427
  * Matches same-chain classic swaps and wrap/unwrap operations on the listed chains.
394
428
  * Cross-chain bridges never match.
@@ -1,5 +1,5 @@
1
1
  import { MethodKind } from "@bufbuild/protobuf";
2
- import { CreateUserRequest, CreateUserResponse, DeleteUserRequest, DeleteUserResponse, GetUserByEmailRequest, GetUserByEmailResponse, GetUserRequest, GetUserResponse, InternalDeleteUserRequest, InternalDeleteUserResponse, ModifyUserRequest, ModifyUserResponse } from "./userService_pb.js";
2
+ import { CreateUserRequest, CreateUserResponse, DeleteUserRequest, DeleteUserResponse, GetUserByEmailRequest, GetUserByEmailResponse, GetUserRequest, GetUserResponse, InternalDeleteUserRequest, InternalDeleteUserResponse, InternalModifyUserRequest, InternalModifyUserResponse, ModifyUserRequest, ModifyUserResponse } from "./userService_pb.js";
3
3
  /**
4
4
  * External facing & Authed endpoints - get UserID directly through ctx.auth.userID header
5
5
  *
@@ -86,3 +86,19 @@ export declare const internalDeleteUser: {
86
86
  readonly typeName: "uniswap.platformservice.v1.UserService";
87
87
  };
88
88
  };
89
+ /**
90
+ * Internal endpoint - set a user's org (VPN-restricted; not exposed via EGW).
91
+ * Called in-process by OrganizationService to link a creator to their new org.
92
+ *
93
+ * @generated from rpc uniswap.platformservice.v1.UserService.InternalModifyUser
94
+ */
95
+ export declare const internalModifyUser: {
96
+ readonly localName: "internalModifyUser";
97
+ readonly name: "InternalModifyUser";
98
+ readonly kind: MethodKind.Unary;
99
+ readonly I: typeof InternalModifyUserRequest;
100
+ readonly O: typeof InternalModifyUserResponse;
101
+ readonly service: {
102
+ readonly typeName: "uniswap.platformservice.v1.UserService";
103
+ };
104
+ };
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
  import { MethodKind } from "@bufbuild/protobuf";
6
- import { CreateUserRequest, CreateUserResponse, DeleteUserRequest, DeleteUserResponse, GetUserByEmailRequest, GetUserByEmailResponse, GetUserRequest, GetUserResponse, InternalDeleteUserRequest, InternalDeleteUserResponse, ModifyUserRequest, ModifyUserResponse } from "./userService_pb.js";
6
+ import { CreateUserRequest, CreateUserResponse, DeleteUserRequest, DeleteUserResponse, GetUserByEmailRequest, GetUserByEmailResponse, GetUserRequest, GetUserResponse, InternalDeleteUserRequest, InternalDeleteUserResponse, InternalModifyUserRequest, InternalModifyUserResponse, ModifyUserRequest, ModifyUserResponse } from "./userService_pb.js";
7
7
  /**
8
8
  * External facing & Authed endpoints - get UserID directly through ctx.auth.userID header
9
9
  *
@@ -90,3 +90,19 @@ export const internalDeleteUser = {
90
90
  typeName: "uniswap.platformservice.v1.UserService"
91
91
  }
92
92
  };
93
+ /**
94
+ * Internal endpoint - set a user's org (VPN-restricted; not exposed via EGW).
95
+ * Called in-process by OrganizationService to link a creator to their new org.
96
+ *
97
+ * @generated from rpc uniswap.platformservice.v1.UserService.InternalModifyUser
98
+ */
99
+ export const internalModifyUser = {
100
+ localName: "internalModifyUser",
101
+ name: "InternalModifyUser",
102
+ kind: MethodKind.Unary,
103
+ I: InternalModifyUserRequest,
104
+ O: InternalModifyUserResponse,
105
+ service: {
106
+ typeName: "uniswap.platformservice.v1.UserService"
107
+ }
108
+ };
@@ -1,4 +1,4 @@
1
- import { CreateUserRequest, CreateUserResponse, DeleteUserRequest, DeleteUserResponse, GetUserByEmailRequest, GetUserByEmailResponse, GetUserRequest, GetUserResponse, InternalDeleteUserRequest, InternalDeleteUserResponse, ModifyUserRequest, ModifyUserResponse } from "./userService_pb.js";
1
+ import { CreateUserRequest, CreateUserResponse, DeleteUserRequest, DeleteUserResponse, GetUserByEmailRequest, GetUserByEmailResponse, GetUserRequest, GetUserResponse, InternalDeleteUserRequest, InternalDeleteUserResponse, InternalModifyUserRequest, InternalModifyUserResponse, ModifyUserRequest, ModifyUserResponse } from "./userService_pb.js";
2
2
  import { MethodKind } from "@bufbuild/protobuf";
3
3
  /**
4
4
  * @generated from service uniswap.platformservice.v1.UserService
@@ -68,5 +68,17 @@ export declare const UserService: {
68
68
  readonly O: typeof InternalDeleteUserResponse;
69
69
  readonly kind: MethodKind.Unary;
70
70
  };
71
+ /**
72
+ * Internal endpoint - set a user's org (VPN-restricted; not exposed via EGW).
73
+ * Called in-process by OrganizationService to link a creator to their new org.
74
+ *
75
+ * @generated from rpc uniswap.platformservice.v1.UserService.InternalModifyUser
76
+ */
77
+ readonly internalModifyUser: {
78
+ readonly name: "InternalModifyUser";
79
+ readonly I: typeof InternalModifyUserRequest;
80
+ readonly O: typeof InternalModifyUserResponse;
81
+ readonly kind: MethodKind.Unary;
82
+ };
71
83
  };
72
84
  };
@@ -2,7 +2,7 @@
2
2
  // @generated from file uniswap/platformservice/v1/userService.proto (package uniswap.platformservice.v1, syntax proto3)
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
- import { CreateUserRequest, CreateUserResponse, DeleteUserRequest, DeleteUserResponse, GetUserByEmailRequest, GetUserByEmailResponse, GetUserRequest, GetUserResponse, InternalDeleteUserRequest, InternalDeleteUserResponse, ModifyUserRequest, ModifyUserResponse } from "./userService_pb.js";
5
+ import { CreateUserRequest, CreateUserResponse, DeleteUserRequest, DeleteUserResponse, GetUserByEmailRequest, GetUserByEmailResponse, GetUserRequest, GetUserResponse, InternalDeleteUserRequest, InternalDeleteUserResponse, InternalModifyUserRequest, InternalModifyUserResponse, ModifyUserRequest, ModifyUserResponse } from "./userService_pb.js";
6
6
  import { MethodKind } from "@bufbuild/protobuf";
7
7
  /**
8
8
  * @generated from service uniswap.platformservice.v1.UserService
@@ -72,5 +72,17 @@ export const UserService = {
72
72
  O: InternalDeleteUserResponse,
73
73
  kind: MethodKind.Unary,
74
74
  },
75
+ /**
76
+ * Internal endpoint - set a user's org (VPN-restricted; not exposed via EGW).
77
+ * Called in-process by OrganizationService to link a creator to their new org.
78
+ *
79
+ * @generated from rpc uniswap.platformservice.v1.UserService.InternalModifyUser
80
+ */
81
+ internalModifyUser: {
82
+ name: "InternalModifyUser",
83
+ I: InternalModifyUserRequest,
84
+ O: InternalModifyUserResponse,
85
+ kind: MethodKind.Unary,
86
+ },
75
87
  }
76
88
  };
@@ -127,12 +127,6 @@ export declare class ModifyUserRequest extends Message<ModifyUserRequest> {
127
127
  * @generated from field: repeated uniswap.platformservice.v1.Agreement agreements = 2;
128
128
  */
129
129
  agreements: Agreement[];
130
- /**
131
- * Organization ID (optional, for linking user to org)
132
- *
133
- * @generated from field: optional string org_id = 3;
134
- */
135
- orgId?: string;
136
130
  constructor(data?: PartialMessage<ModifyUserRequest>);
137
131
  static readonly runtime: typeof proto3;
138
132
  static readonly typeName = "uniswap.platformservice.v1.ModifyUserRequest";
@@ -348,3 +342,39 @@ export declare class InternalDeleteUserResponse extends Message<InternalDeleteUs
348
342
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): InternalDeleteUserResponse;
349
343
  static equals(a: InternalDeleteUserResponse | PlainMessage<InternalDeleteUserResponse> | undefined, b: InternalDeleteUserResponse | PlainMessage<InternalDeleteUserResponse> | undefined): boolean;
350
344
  }
345
+ /**
346
+ * Internal Modify User request/response (internal-only: sets the authenticated
347
+ * caller's org). The public ModifyUser must NOT set org_id (bug bounty #824);
348
+ * org membership is established here, called in-process by OrganizationService
349
+ * when a user creates an org (linking the creator). The target user is the
350
+ * authenticated caller (from context), never carried in the request.
351
+ *
352
+ * @generated from message uniswap.platformservice.v1.InternalModifyUserRequest
353
+ */
354
+ export declare class InternalModifyUserRequest extends Message<InternalModifyUserRequest> {
355
+ /**
356
+ * @generated from field: optional string org_id = 1;
357
+ */
358
+ orgId?: string;
359
+ constructor(data?: PartialMessage<InternalModifyUserRequest>);
360
+ static readonly runtime: typeof proto3;
361
+ static readonly typeName = "uniswap.platformservice.v1.InternalModifyUserRequest";
362
+ static readonly fields: FieldList;
363
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): InternalModifyUserRequest;
364
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): InternalModifyUserRequest;
365
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): InternalModifyUserRequest;
366
+ static equals(a: InternalModifyUserRequest | PlainMessage<InternalModifyUserRequest> | undefined, b: InternalModifyUserRequest | PlainMessage<InternalModifyUserRequest> | undefined): boolean;
367
+ }
368
+ /**
369
+ * @generated from message uniswap.platformservice.v1.InternalModifyUserResponse
370
+ */
371
+ export declare class InternalModifyUserResponse extends Message<InternalModifyUserResponse> {
372
+ constructor(data?: PartialMessage<InternalModifyUserResponse>);
373
+ static readonly runtime: typeof proto3;
374
+ static readonly typeName = "uniswap.platformservice.v1.InternalModifyUserResponse";
375
+ static readonly fields: FieldList;
376
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): InternalModifyUserResponse;
377
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): InternalModifyUserResponse;
378
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): InternalModifyUserResponse;
379
+ static equals(a: InternalModifyUserResponse | PlainMessage<InternalModifyUserResponse> | undefined, b: InternalModifyUserResponse | PlainMessage<InternalModifyUserResponse> | undefined): boolean;
380
+ }
@@ -201,7 +201,6 @@ ModifyUserRequest.typeName = "uniswap.platformservice.v1.ModifyUserRequest";
201
201
  ModifyUserRequest.fields = proto3.util.newFieldList(() => [
202
202
  { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
203
203
  { no: 2, name: "agreements", kind: "message", T: Agreement, repeated: true },
204
- { no: 3, name: "org_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
205
204
  ]);
206
205
  /**
207
206
  * Response for modify user
@@ -501,3 +500,59 @@ export class InternalDeleteUserResponse extends Message {
501
500
  InternalDeleteUserResponse.runtime = proto3;
502
501
  InternalDeleteUserResponse.typeName = "uniswap.platformservice.v1.InternalDeleteUserResponse";
503
502
  InternalDeleteUserResponse.fields = proto3.util.newFieldList(() => []);
503
+ /**
504
+ * Internal Modify User request/response (internal-only: sets the authenticated
505
+ * caller's org). The public ModifyUser must NOT set org_id (bug bounty #824);
506
+ * org membership is established here, called in-process by OrganizationService
507
+ * when a user creates an org (linking the creator). The target user is the
508
+ * authenticated caller (from context), never carried in the request.
509
+ *
510
+ * @generated from message uniswap.platformservice.v1.InternalModifyUserRequest
511
+ */
512
+ export class InternalModifyUserRequest extends Message {
513
+ constructor(data) {
514
+ super();
515
+ proto3.util.initPartial(data, this);
516
+ }
517
+ static fromBinary(bytes, options) {
518
+ return new InternalModifyUserRequest().fromBinary(bytes, options);
519
+ }
520
+ static fromJson(jsonValue, options) {
521
+ return new InternalModifyUserRequest().fromJson(jsonValue, options);
522
+ }
523
+ static fromJsonString(jsonString, options) {
524
+ return new InternalModifyUserRequest().fromJsonString(jsonString, options);
525
+ }
526
+ static equals(a, b) {
527
+ return proto3.util.equals(InternalModifyUserRequest, a, b);
528
+ }
529
+ }
530
+ InternalModifyUserRequest.runtime = proto3;
531
+ InternalModifyUserRequest.typeName = "uniswap.platformservice.v1.InternalModifyUserRequest";
532
+ InternalModifyUserRequest.fields = proto3.util.newFieldList(() => [
533
+ { no: 1, name: "org_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
534
+ ]);
535
+ /**
536
+ * @generated from message uniswap.platformservice.v1.InternalModifyUserResponse
537
+ */
538
+ export class InternalModifyUserResponse extends Message {
539
+ constructor(data) {
540
+ super();
541
+ proto3.util.initPartial(data, this);
542
+ }
543
+ static fromBinary(bytes, options) {
544
+ return new InternalModifyUserResponse().fromBinary(bytes, options);
545
+ }
546
+ static fromJson(jsonValue, options) {
547
+ return new InternalModifyUserResponse().fromJson(jsonValue, options);
548
+ }
549
+ static fromJsonString(jsonString, options) {
550
+ return new InternalModifyUserResponse().fromJsonString(jsonString, options);
551
+ }
552
+ static equals(a, b) {
553
+ return proto3.util.equals(InternalModifyUserResponse, a, b);
554
+ }
555
+ }
556
+ InternalModifyUserResponse.runtime = proto3;
557
+ InternalModifyUserResponse.typeName = "uniswap.platformservice.v1.InternalModifyUserResponse";
558
+ InternalModifyUserResponse.fields = proto3.util.newFieldList(() => []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-platform-service",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },