@uniswap/client-platform-service 0.0.13 → 0.0.14

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.
@@ -1,5 +1,28 @@
1
1
  import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
2
  import { Message, proto3, Timestamp } from "@bufbuild/protobuf";
3
+ /**
4
+ * API Key Tier
5
+ *
6
+ * @generated from enum uniswap.platformservice.v1.ApiKeyTier
7
+ */
8
+ export declare enum ApiKeyTier {
9
+ /**
10
+ * @generated from enum value: API_KEY_TIER_UNSPECIFIED = 0;
11
+ */
12
+ UNSPECIFIED = 0,
13
+ /**
14
+ * @generated from enum value: API_KEY_TIER_INTERNAL = 1;
15
+ */
16
+ INTERNAL = 1,
17
+ /**
18
+ * @generated from enum value: API_KEY_TIER_PARTNER = 2;
19
+ */
20
+ PARTNER = 2,
21
+ /**
22
+ * @generated from enum value: API_KEY_TIER_DEV_PORTAL = 3;
23
+ */
24
+ DEV_PORTAL = 3
25
+ }
3
26
  /**
4
27
  * Rate limit configuration
5
28
  *
@@ -79,6 +102,10 @@ export declare class IntrospectResponse extends Message<IntrospectResponse> {
79
102
  * @generated from field: string organization_id = 4;
80
103
  */
81
104
  organizationId: string;
105
+ /**
106
+ * @generated from field: string analytics_id = 5;
107
+ */
108
+ analyticsId: string;
82
109
  constructor(data?: PartialMessage<IntrospectResponse>);
83
110
  static readonly runtime: typeof proto3;
84
111
  static readonly typeName = "uniswap.platformservice.v1.IntrospectResponse";
@@ -326,6 +353,10 @@ export declare class InternalCreateApiKeyRequest extends Message<InternalCreateA
326
353
  * @generated from field: optional uniswap.platformservice.v1.RateLimitConfig rate_limit_config = 3;
327
354
  */
328
355
  rateLimitConfig?: RateLimitConfig;
356
+ /**
357
+ * @generated from field: uniswap.platformservice.v1.ApiKeyTier tier = 4;
358
+ */
359
+ tier: ApiKeyTier;
329
360
  constructor(data?: PartialMessage<InternalCreateApiKeyRequest>);
330
361
  static readonly runtime: typeof proto3;
331
362
  static readonly typeName = "uniswap.platformservice.v1.InternalCreateApiKeyRequest";
@@ -3,6 +3,37 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
  import { Message, proto3, Timestamp } from "@bufbuild/protobuf";
6
+ /**
7
+ * API Key Tier
8
+ *
9
+ * @generated from enum uniswap.platformservice.v1.ApiKeyTier
10
+ */
11
+ export var ApiKeyTier;
12
+ (function (ApiKeyTier) {
13
+ /**
14
+ * @generated from enum value: API_KEY_TIER_UNSPECIFIED = 0;
15
+ */
16
+ ApiKeyTier[ApiKeyTier["UNSPECIFIED"] = 0] = "UNSPECIFIED";
17
+ /**
18
+ * @generated from enum value: API_KEY_TIER_INTERNAL = 1;
19
+ */
20
+ ApiKeyTier[ApiKeyTier["INTERNAL"] = 1] = "INTERNAL";
21
+ /**
22
+ * @generated from enum value: API_KEY_TIER_PARTNER = 2;
23
+ */
24
+ ApiKeyTier[ApiKeyTier["PARTNER"] = 2] = "PARTNER";
25
+ /**
26
+ * @generated from enum value: API_KEY_TIER_DEV_PORTAL = 3;
27
+ */
28
+ ApiKeyTier[ApiKeyTier["DEV_PORTAL"] = 3] = "DEV_PORTAL";
29
+ })(ApiKeyTier || (ApiKeyTier = {}));
30
+ // Retrieve enum metadata with: proto3.getEnumType(ApiKeyTier)
31
+ proto3.util.setEnumType(ApiKeyTier, "uniswap.platformservice.v1.ApiKeyTier", [
32
+ { no: 0, name: "API_KEY_TIER_UNSPECIFIED" },
33
+ { no: 1, name: "API_KEY_TIER_INTERNAL" },
34
+ { no: 2, name: "API_KEY_TIER_PARTNER" },
35
+ { no: 3, name: "API_KEY_TIER_DEV_PORTAL" },
36
+ ]);
6
37
  /**
7
38
  * Rate limit configuration
8
39
  *
@@ -112,6 +143,10 @@ export class IntrospectResponse extends Message {
112
143
  * @generated from field: string organization_id = 4;
113
144
  */
114
145
  this.organizationId = "";
146
+ /**
147
+ * @generated from field: string analytics_id = 5;
148
+ */
149
+ this.analyticsId = "";
115
150
  proto3.util.initPartial(data, this);
116
151
  }
117
152
  static fromBinary(bytes, options) {
@@ -134,6 +169,7 @@ IntrospectResponse.fields = proto3.util.newFieldList(() => [
134
169
  { no: 2, name: "result", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
135
170
  { no: 3, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
136
171
  { no: 4, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
172
+ { no: 5, name: "analytics_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
137
173
  ]);
138
174
  /**
139
175
  * Create API Key request/response
@@ -469,6 +505,10 @@ export class InternalCreateApiKeyRequest extends Message {
469
505
  * @generated from field: string name = 2;
470
506
  */
471
507
  this.name = "";
508
+ /**
509
+ * @generated from field: uniswap.platformservice.v1.ApiKeyTier tier = 4;
510
+ */
511
+ this.tier = ApiKeyTier.UNSPECIFIED;
472
512
  proto3.util.initPartial(data, this);
473
513
  }
474
514
  static fromBinary(bytes, options) {
@@ -490,6 +530,7 @@ InternalCreateApiKeyRequest.fields = proto3.util.newFieldList(() => [
490
530
  { no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
491
531
  { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
492
532
  { no: 3, name: "rate_limit_config", kind: "message", T: RateLimitConfig, opt: true },
533
+ { no: 4, name: "tier", kind: "enum", T: proto3.getEnumType(ApiKeyTier) },
493
534
  ]);
494
535
  /**
495
536
  * @generated from message uniswap.platformservice.v1.InternalCreateApiKeyResponse
@@ -294,6 +294,40 @@ export declare class GitHubData extends Message<GitHubData> {
294
294
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GitHubData;
295
295
  static equals(a: GitHubData | PlainMessage<GitHubData> | undefined, b: GitHubData | PlainMessage<GitHubData> | undefined): boolean;
296
296
  }
297
+ /**
298
+ * Challenge failure reasons
299
+ *
300
+ * @generated from message uniswap.platformservice.v1.ChallengeFailure
301
+ */
302
+ export declare class ChallengeFailure extends Message<ChallengeFailure> {
303
+ /**
304
+ * @generated from field: uniswap.platformservice.v1.ChallengeFailure.Reason reason = 1;
305
+ */
306
+ reason: ChallengeFailure_Reason;
307
+ constructor(data?: PartialMessage<ChallengeFailure>);
308
+ static readonly runtime: typeof proto3;
309
+ static readonly typeName = "uniswap.platformservice.v1.ChallengeFailure";
310
+ static readonly fields: FieldList;
311
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChallengeFailure;
312
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChallengeFailure;
313
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChallengeFailure;
314
+ static equals(a: ChallengeFailure | PlainMessage<ChallengeFailure> | undefined, b: ChallengeFailure | PlainMessage<ChallengeFailure> | undefined): boolean;
315
+ }
316
+ /**
317
+ * @generated from enum uniswap.platformservice.v1.ChallengeFailure.Reason
318
+ */
319
+ export declare enum ChallengeFailure_Reason {
320
+ /**
321
+ * @generated from enum value: REASON_UNSPECIFIED = 0;
322
+ */
323
+ UNSPECIFIED = 0,
324
+ /**
325
+ * Session must pass bot detection first (score < 60)
326
+ *
327
+ * @generated from enum value: REASON_BOT_DETECTION_REQUIRED = 1;
328
+ */
329
+ BOT_DETECTION_REQUIRED = 1
330
+ }
297
331
  /**
298
332
  * @generated from message uniswap.platformservice.v1.ChallengeResponse
299
333
  */
@@ -320,7 +354,7 @@ export declare class ChallengeResponse extends Message<ChallengeResponse> {
320
354
  [key: string]: string;
321
355
  };
322
356
  /**
323
- * NEW: Type-safe challenge-specific data
357
+ * Type-safe challenge-specific data
324
358
  *
325
359
  * @generated from oneof uniswap.platformservice.v1.ChallengeResponse.challenge_data
326
360
  */
@@ -346,6 +380,13 @@ export declare class ChallengeResponse extends Message<ChallengeResponse> {
346
380
  case: undefined;
347
381
  value?: undefined;
348
382
  };
383
+ /**
384
+ * Present only when challenge request fails
385
+ * When failure is set, other fields (challenge_id, challenge_type, challenge_data) are not populated
386
+ *
387
+ * @generated from field: optional uniswap.platformservice.v1.ChallengeFailure failure = 7;
388
+ */
389
+ failure?: ChallengeFailure;
349
390
  constructor(data?: PartialMessage<ChallengeResponse>);
350
391
  static readonly runtime: typeof proto3;
351
392
  static readonly typeName = "uniswap.platformservice.v1.ChallengeResponse";
@@ -433,6 +433,59 @@ GitHubData.typeName = "uniswap.platformservice.v1.GitHubData";
433
433
  GitHubData.fields = proto3.util.newFieldList(() => [
434
434
  { no: 1, name: "authorize_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
435
435
  ]);
436
+ /**
437
+ * Challenge failure reasons
438
+ *
439
+ * @generated from message uniswap.platformservice.v1.ChallengeFailure
440
+ */
441
+ export class ChallengeFailure extends Message {
442
+ constructor(data) {
443
+ super();
444
+ /**
445
+ * @generated from field: uniswap.platformservice.v1.ChallengeFailure.Reason reason = 1;
446
+ */
447
+ this.reason = ChallengeFailure_Reason.UNSPECIFIED;
448
+ proto3.util.initPartial(data, this);
449
+ }
450
+ static fromBinary(bytes, options) {
451
+ return new ChallengeFailure().fromBinary(bytes, options);
452
+ }
453
+ static fromJson(jsonValue, options) {
454
+ return new ChallengeFailure().fromJson(jsonValue, options);
455
+ }
456
+ static fromJsonString(jsonString, options) {
457
+ return new ChallengeFailure().fromJsonString(jsonString, options);
458
+ }
459
+ static equals(a, b) {
460
+ return proto3.util.equals(ChallengeFailure, a, b);
461
+ }
462
+ }
463
+ ChallengeFailure.runtime = proto3;
464
+ ChallengeFailure.typeName = "uniswap.platformservice.v1.ChallengeFailure";
465
+ ChallengeFailure.fields = proto3.util.newFieldList(() => [
466
+ { no: 1, name: "reason", kind: "enum", T: proto3.getEnumType(ChallengeFailure_Reason) },
467
+ ]);
468
+ /**
469
+ * @generated from enum uniswap.platformservice.v1.ChallengeFailure.Reason
470
+ */
471
+ export var ChallengeFailure_Reason;
472
+ (function (ChallengeFailure_Reason) {
473
+ /**
474
+ * @generated from enum value: REASON_UNSPECIFIED = 0;
475
+ */
476
+ ChallengeFailure_Reason[ChallengeFailure_Reason["UNSPECIFIED"] = 0] = "UNSPECIFIED";
477
+ /**
478
+ * Session must pass bot detection first (score < 60)
479
+ *
480
+ * @generated from enum value: REASON_BOT_DETECTION_REQUIRED = 1;
481
+ */
482
+ ChallengeFailure_Reason[ChallengeFailure_Reason["BOT_DETECTION_REQUIRED"] = 1] = "BOT_DETECTION_REQUIRED";
483
+ })(ChallengeFailure_Reason || (ChallengeFailure_Reason = {}));
484
+ // Retrieve enum metadata with: proto3.getEnumType(ChallengeFailure_Reason)
485
+ proto3.util.setEnumType(ChallengeFailure_Reason, "uniswap.platformservice.v1.ChallengeFailure.Reason", [
486
+ { no: 0, name: "REASON_UNSPECIFIED" },
487
+ { no: 1, name: "REASON_BOT_DETECTION_REQUIRED" },
488
+ ]);
436
489
  /**
437
490
  * @generated from message uniswap.platformservice.v1.ChallengeResponse
438
491
  */
@@ -459,7 +512,7 @@ export class ChallengeResponse extends Message {
459
512
  */
460
513
  this.extra = {};
461
514
  /**
462
- * NEW: Type-safe challenge-specific data
515
+ * Type-safe challenge-specific data
463
516
  *
464
517
  * @generated from oneof uniswap.platformservice.v1.ChallengeResponse.challenge_data
465
518
  */
@@ -488,6 +541,7 @@ ChallengeResponse.fields = proto3.util.newFieldList(() => [
488
541
  { no: 4, name: "turnstile", kind: "message", T: TurnstileData, oneof: "challenge_data" },
489
542
  { no: 5, name: "hashcash", kind: "message", T: HashCashData, oneof: "challenge_data" },
490
543
  { no: 6, name: "github", kind: "message", T: GitHubData, oneof: "challenge_data" },
544
+ { no: 7, name: "failure", kind: "message", T: ChallengeFailure, opt: true },
491
545
  ]);
492
546
  /**
493
547
  * @generated from message uniswap.platformservice.v1.VerifyRequest
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-platform-service",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },