@oxy.so/contracts 1.0.1 → 1.1.1

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.
@@ -82,5 +82,896 @@ export declare const oauthAuthorizeCodeResponseSchema: z.ZodObject<{
82
82
  redirectUri: string;
83
83
  expiresIn: number;
84
84
  }>;
85
+ /**
86
+ * Display-safe identity of a dynamically registered external MCP client.
87
+ * Reuses the ordinary public application projection and adds only the public
88
+ * DCR client id needed to bind the consent surface to the request.
89
+ */
90
+ export declare const mcpOAuthClientApplicationSchema: z.ZodObject<{
91
+ id: z.ZodString;
92
+ name: z.ZodString;
93
+ description: z.ZodOptional<z.ZodString>;
94
+ icon: z.ZodOptional<z.ZodString>;
95
+ websiteUrl: z.ZodOptional<z.ZodString>;
96
+ privacyPolicyUrl: z.ZodOptional<z.ZodString>;
97
+ termsUrl: z.ZodOptional<z.ZodString>;
98
+ type: z.ZodEnum<["first_party", "third_party", "internal", "system"]>;
99
+ isOfficial: z.ZodBoolean;
100
+ isInternal: z.ZodBoolean;
101
+ scopes: z.ZodArray<z.ZodString, "many">;
102
+ developerName: z.ZodOptional<z.ZodString>;
103
+ } & {
104
+ clientId: z.ZodString;
105
+ }, "strict", z.ZodTypeAny, {
106
+ type: "internal" | "system" | "first_party" | "third_party";
107
+ name: string;
108
+ id: string;
109
+ clientId: string;
110
+ isOfficial: boolean;
111
+ isInternal: boolean;
112
+ scopes: string[];
113
+ description?: string | undefined;
114
+ icon?: string | undefined;
115
+ websiteUrl?: string | undefined;
116
+ privacyPolicyUrl?: string | undefined;
117
+ termsUrl?: string | undefined;
118
+ developerName?: string | undefined;
119
+ }, {
120
+ type: "internal" | "system" | "first_party" | "third_party";
121
+ name: string;
122
+ id: string;
123
+ clientId: string;
124
+ isOfficial: boolean;
125
+ isInternal: boolean;
126
+ scopes: string[];
127
+ description?: string | undefined;
128
+ icon?: string | undefined;
129
+ websiteUrl?: string | undefined;
130
+ privacyPolicyUrl?: string | undefined;
131
+ termsUrl?: string | undefined;
132
+ developerName?: string | undefined;
133
+ }>;
134
+ /**
135
+ * An effectful MCP action the requested capability set can actually invoke.
136
+ * Every field is picked from the canonical catalog tool schema so consent can
137
+ * never maintain a second tool description or effect classification.
138
+ */
139
+ export declare const mcpOAuthWriteActionSchema: z.ZodEffects<z.ZodObject<Pick<{
140
+ name: z.ZodString;
141
+ version: z.ZodString;
142
+ description: z.ZodString;
143
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
144
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
145
+ capabilityPackage: z.ZodEnum<["read", "create", "publish", "communicate", "administer", "finance", "security", "delegate"]>;
146
+ requiredCapabilities: z.ZodArray<z.ZodString, "many">;
147
+ resourceTypes: z.ZodArray<z.ZodString, "many">;
148
+ effect: z.ZodEnum<["read", "write", "external", "financial", "security"]>;
149
+ idempotency: z.ZodEnum<["none", "supported", "required"]>;
150
+ rollback: z.ZodEnum<["none", "manual", "supported"]>;
151
+ exposure: z.ZodArray<z.ZodEnum<["internal", "mcp"]>, "many">;
152
+ limitKeys: z.ZodDefault<z.ZodArray<z.ZodObject<{
153
+ key: z.ZodString;
154
+ kind: z.ZodEnum<["maximum_number", "exact_boolean"]>;
155
+ }, "strict", z.ZodTypeAny, {
156
+ kind: "maximum_number" | "exact_boolean";
157
+ key: string;
158
+ }, {
159
+ kind: "maximum_number" | "exact_boolean";
160
+ key: string;
161
+ }>, "many">>;
162
+ invocation: z.ZodObject<{
163
+ method: z.ZodEnum<["GET", "POST", "PATCH", "PUT", "DELETE"]>;
164
+ path: z.ZodString;
165
+ }, "strict", z.ZodTypeAny, {
166
+ path: string;
167
+ method: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
168
+ }, {
169
+ path: string;
170
+ method: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
171
+ }>;
172
+ }, "effect" | "name" | "description" | "version" | "requiredCapabilities">, "strict", z.ZodTypeAny, {
173
+ effect: "security" | "read" | "write" | "external" | "financial";
174
+ name: string;
175
+ description: string;
176
+ version: string;
177
+ requiredCapabilities: string[];
178
+ }, {
179
+ effect: "security" | "read" | "write" | "external" | "financial";
180
+ name: string;
181
+ description: string;
182
+ version: string;
183
+ requiredCapabilities: string[];
184
+ }>, {
185
+ effect: "security" | "read" | "write" | "external" | "financial";
186
+ name: string;
187
+ description: string;
188
+ version: string;
189
+ requiredCapabilities: string[];
190
+ }, {
191
+ effect: "security" | "read" | "write" | "external" | "financial";
192
+ name: string;
193
+ description: string;
194
+ version: string;
195
+ requiredCapabilities: string[];
196
+ }>;
197
+ /** Exact, server-resolved context rendered before an external MCP grant. */
198
+ export declare const mcpOAuthConsentContextSchema: z.ZodObject<{
199
+ client: z.ZodObject<{
200
+ id: z.ZodString;
201
+ name: z.ZodString;
202
+ description: z.ZodOptional<z.ZodString>;
203
+ icon: z.ZodOptional<z.ZodString>;
204
+ websiteUrl: z.ZodOptional<z.ZodString>;
205
+ privacyPolicyUrl: z.ZodOptional<z.ZodString>;
206
+ termsUrl: z.ZodOptional<z.ZodString>;
207
+ type: z.ZodEnum<["first_party", "third_party", "internal", "system"]>;
208
+ isOfficial: z.ZodBoolean;
209
+ isInternal: z.ZodBoolean;
210
+ scopes: z.ZodArray<z.ZodString, "many">;
211
+ developerName: z.ZodOptional<z.ZodString>;
212
+ } & {
213
+ clientId: z.ZodString;
214
+ }, "strict", z.ZodTypeAny, {
215
+ type: "internal" | "system" | "first_party" | "third_party";
216
+ name: string;
217
+ id: string;
218
+ clientId: string;
219
+ isOfficial: boolean;
220
+ isInternal: boolean;
221
+ scopes: string[];
222
+ description?: string | undefined;
223
+ icon?: string | undefined;
224
+ websiteUrl?: string | undefined;
225
+ privacyPolicyUrl?: string | undefined;
226
+ termsUrl?: string | undefined;
227
+ developerName?: string | undefined;
228
+ }, {
229
+ type: "internal" | "system" | "first_party" | "third_party";
230
+ name: string;
231
+ id: string;
232
+ clientId: string;
233
+ isOfficial: boolean;
234
+ isInternal: boolean;
235
+ scopes: string[];
236
+ description?: string | undefined;
237
+ icon?: string | undefined;
238
+ websiteUrl?: string | undefined;
239
+ privacyPolicyUrl?: string | undefined;
240
+ termsUrl?: string | undefined;
241
+ developerName?: string | undefined;
242
+ }>;
243
+ account: z.ZodObject<{
244
+ id: z.ZodString;
245
+ displayName: z.ZodOptional<z.ZodString>;
246
+ handle: z.ZodOptional<z.ZodString>;
247
+ avatar: z.ZodOptional<z.ZodString>;
248
+ }, "strict", z.ZodTypeAny, {
249
+ id: string;
250
+ displayName?: string | undefined;
251
+ avatar?: string | undefined;
252
+ handle?: string | undefined;
253
+ }, {
254
+ id: string;
255
+ displayName?: string | undefined;
256
+ avatar?: string | undefined;
257
+ handle?: string | undefined;
258
+ }>;
259
+ resource: z.ZodObject<{
260
+ appId: z.ZodString;
261
+ uri: z.ZodString;
262
+ application: z.ZodObject<{
263
+ id: z.ZodString;
264
+ name: z.ZodString;
265
+ description: z.ZodOptional<z.ZodString>;
266
+ icon: z.ZodOptional<z.ZodString>;
267
+ websiteUrl: z.ZodOptional<z.ZodString>;
268
+ privacyPolicyUrl: z.ZodOptional<z.ZodString>;
269
+ termsUrl: z.ZodOptional<z.ZodString>;
270
+ type: z.ZodEnum<["first_party", "third_party", "internal", "system"]>;
271
+ isOfficial: z.ZodBoolean;
272
+ isInternal: z.ZodBoolean;
273
+ scopes: z.ZodArray<z.ZodString, "many">;
274
+ developerName: z.ZodOptional<z.ZodString>;
275
+ }, "strip", z.ZodTypeAny, {
276
+ type: "internal" | "system" | "first_party" | "third_party";
277
+ name: string;
278
+ id: string;
279
+ isOfficial: boolean;
280
+ isInternal: boolean;
281
+ scopes: string[];
282
+ description?: string | undefined;
283
+ icon?: string | undefined;
284
+ websiteUrl?: string | undefined;
285
+ privacyPolicyUrl?: string | undefined;
286
+ termsUrl?: string | undefined;
287
+ developerName?: string | undefined;
288
+ }, {
289
+ type: "internal" | "system" | "first_party" | "third_party";
290
+ name: string;
291
+ id: string;
292
+ isOfficial: boolean;
293
+ isInternal: boolean;
294
+ scopes: string[];
295
+ description?: string | undefined;
296
+ icon?: string | undefined;
297
+ websiteUrl?: string | undefined;
298
+ privacyPolicyUrl?: string | undefined;
299
+ termsUrl?: string | undefined;
300
+ developerName?: string | undefined;
301
+ }>;
302
+ }, "strict", z.ZodTypeAny, {
303
+ appId: string;
304
+ application: {
305
+ type: "internal" | "system" | "first_party" | "third_party";
306
+ name: string;
307
+ id: string;
308
+ isOfficial: boolean;
309
+ isInternal: boolean;
310
+ scopes: string[];
311
+ description?: string | undefined;
312
+ icon?: string | undefined;
313
+ websiteUrl?: string | undefined;
314
+ privacyPolicyUrl?: string | undefined;
315
+ termsUrl?: string | undefined;
316
+ developerName?: string | undefined;
317
+ };
318
+ uri: string;
319
+ }, {
320
+ appId: string;
321
+ application: {
322
+ type: "internal" | "system" | "first_party" | "third_party";
323
+ name: string;
324
+ id: string;
325
+ isOfficial: boolean;
326
+ isInternal: boolean;
327
+ scopes: string[];
328
+ description?: string | undefined;
329
+ icon?: string | undefined;
330
+ websiteUrl?: string | undefined;
331
+ privacyPolicyUrl?: string | undefined;
332
+ termsUrl?: string | undefined;
333
+ developerName?: string | undefined;
334
+ };
335
+ uri: string;
336
+ }>;
337
+ capabilities: z.ZodArray<z.ZodString, "many">;
338
+ writeActions: z.ZodArray<z.ZodEffects<z.ZodObject<Pick<{
339
+ name: z.ZodString;
340
+ version: z.ZodString;
341
+ description: z.ZodString;
342
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
343
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
344
+ capabilityPackage: z.ZodEnum<["read", "create", "publish", "communicate", "administer", "finance", "security", "delegate"]>;
345
+ requiredCapabilities: z.ZodArray<z.ZodString, "many">;
346
+ resourceTypes: z.ZodArray<z.ZodString, "many">;
347
+ effect: z.ZodEnum<["read", "write", "external", "financial", "security"]>;
348
+ idempotency: z.ZodEnum<["none", "supported", "required"]>;
349
+ rollback: z.ZodEnum<["none", "manual", "supported"]>;
350
+ exposure: z.ZodArray<z.ZodEnum<["internal", "mcp"]>, "many">;
351
+ limitKeys: z.ZodDefault<z.ZodArray<z.ZodObject<{
352
+ key: z.ZodString;
353
+ kind: z.ZodEnum<["maximum_number", "exact_boolean"]>;
354
+ }, "strict", z.ZodTypeAny, {
355
+ kind: "maximum_number" | "exact_boolean";
356
+ key: string;
357
+ }, {
358
+ kind: "maximum_number" | "exact_boolean";
359
+ key: string;
360
+ }>, "many">>;
361
+ invocation: z.ZodObject<{
362
+ method: z.ZodEnum<["GET", "POST", "PATCH", "PUT", "DELETE"]>;
363
+ path: z.ZodString;
364
+ }, "strict", z.ZodTypeAny, {
365
+ path: string;
366
+ method: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
367
+ }, {
368
+ path: string;
369
+ method: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
370
+ }>;
371
+ }, "effect" | "name" | "description" | "version" | "requiredCapabilities">, "strict", z.ZodTypeAny, {
372
+ effect: "security" | "read" | "write" | "external" | "financial";
373
+ name: string;
374
+ description: string;
375
+ version: string;
376
+ requiredCapabilities: string[];
377
+ }, {
378
+ effect: "security" | "read" | "write" | "external" | "financial";
379
+ name: string;
380
+ description: string;
381
+ version: string;
382
+ requiredCapabilities: string[];
383
+ }>, {
384
+ effect: "security" | "read" | "write" | "external" | "financial";
385
+ name: string;
386
+ description: string;
387
+ version: string;
388
+ requiredCapabilities: string[];
389
+ }, {
390
+ effect: "security" | "read" | "write" | "external" | "financial";
391
+ name: string;
392
+ description: string;
393
+ version: string;
394
+ requiredCapabilities: string[];
395
+ }>, "many">;
396
+ }, "strict", z.ZodTypeAny, {
397
+ resource: {
398
+ appId: string;
399
+ application: {
400
+ type: "internal" | "system" | "first_party" | "third_party";
401
+ name: string;
402
+ id: string;
403
+ isOfficial: boolean;
404
+ isInternal: boolean;
405
+ scopes: string[];
406
+ description?: string | undefined;
407
+ icon?: string | undefined;
408
+ websiteUrl?: string | undefined;
409
+ privacyPolicyUrl?: string | undefined;
410
+ termsUrl?: string | undefined;
411
+ developerName?: string | undefined;
412
+ };
413
+ uri: string;
414
+ };
415
+ capabilities: string[];
416
+ account: {
417
+ id: string;
418
+ displayName?: string | undefined;
419
+ avatar?: string | undefined;
420
+ handle?: string | undefined;
421
+ };
422
+ client: {
423
+ type: "internal" | "system" | "first_party" | "third_party";
424
+ name: string;
425
+ id: string;
426
+ clientId: string;
427
+ isOfficial: boolean;
428
+ isInternal: boolean;
429
+ scopes: string[];
430
+ description?: string | undefined;
431
+ icon?: string | undefined;
432
+ websiteUrl?: string | undefined;
433
+ privacyPolicyUrl?: string | undefined;
434
+ termsUrl?: string | undefined;
435
+ developerName?: string | undefined;
436
+ };
437
+ writeActions: {
438
+ effect: "security" | "read" | "write" | "external" | "financial";
439
+ name: string;
440
+ description: string;
441
+ version: string;
442
+ requiredCapabilities: string[];
443
+ }[];
444
+ }, {
445
+ resource: {
446
+ appId: string;
447
+ application: {
448
+ type: "internal" | "system" | "first_party" | "third_party";
449
+ name: string;
450
+ id: string;
451
+ isOfficial: boolean;
452
+ isInternal: boolean;
453
+ scopes: string[];
454
+ description?: string | undefined;
455
+ icon?: string | undefined;
456
+ websiteUrl?: string | undefined;
457
+ privacyPolicyUrl?: string | undefined;
458
+ termsUrl?: string | undefined;
459
+ developerName?: string | undefined;
460
+ };
461
+ uri: string;
462
+ };
463
+ capabilities: string[];
464
+ account: {
465
+ id: string;
466
+ displayName?: string | undefined;
467
+ avatar?: string | undefined;
468
+ handle?: string | undefined;
469
+ };
470
+ client: {
471
+ type: "internal" | "system" | "first_party" | "third_party";
472
+ name: string;
473
+ id: string;
474
+ clientId: string;
475
+ isOfficial: boolean;
476
+ isInternal: boolean;
477
+ scopes: string[];
478
+ description?: string | undefined;
479
+ icon?: string | undefined;
480
+ websiteUrl?: string | undefined;
481
+ privacyPolicyUrl?: string | undefined;
482
+ termsUrl?: string | undefined;
483
+ developerName?: string | undefined;
484
+ };
485
+ writeActions: {
486
+ effect: "security" | "read" | "write" | "external" | "financial";
487
+ name: string;
488
+ description: string;
489
+ version: string;
490
+ requiredCapabilities: string[];
491
+ }[];
492
+ }>;
493
+ export declare const mcpOAuthClientInfoResponseSchema: z.ZodObject<{
494
+ application: z.ZodObject<{
495
+ id: z.ZodString;
496
+ name: z.ZodString;
497
+ description: z.ZodOptional<z.ZodString>;
498
+ icon: z.ZodOptional<z.ZodString>;
499
+ websiteUrl: z.ZodOptional<z.ZodString>;
500
+ privacyPolicyUrl: z.ZodOptional<z.ZodString>;
501
+ termsUrl: z.ZodOptional<z.ZodString>;
502
+ type: z.ZodEnum<["first_party", "third_party", "internal", "system"]>;
503
+ isOfficial: z.ZodBoolean;
504
+ isInternal: z.ZodBoolean;
505
+ scopes: z.ZodArray<z.ZodString, "many">;
506
+ developerName: z.ZodOptional<z.ZodString>;
507
+ } & {
508
+ clientId: z.ZodString;
509
+ }, "strict", z.ZodTypeAny, {
510
+ type: "internal" | "system" | "first_party" | "third_party";
511
+ name: string;
512
+ id: string;
513
+ clientId: string;
514
+ isOfficial: boolean;
515
+ isInternal: boolean;
516
+ scopes: string[];
517
+ description?: string | undefined;
518
+ icon?: string | undefined;
519
+ websiteUrl?: string | undefined;
520
+ privacyPolicyUrl?: string | undefined;
521
+ termsUrl?: string | undefined;
522
+ developerName?: string | undefined;
523
+ }, {
524
+ type: "internal" | "system" | "first_party" | "third_party";
525
+ name: string;
526
+ id: string;
527
+ clientId: string;
528
+ isOfficial: boolean;
529
+ isInternal: boolean;
530
+ scopes: string[];
531
+ description?: string | undefined;
532
+ icon?: string | undefined;
533
+ websiteUrl?: string | undefined;
534
+ privacyPolicyUrl?: string | undefined;
535
+ termsUrl?: string | undefined;
536
+ developerName?: string | undefined;
537
+ }>;
538
+ }, "strict", z.ZodTypeAny, {
539
+ application: {
540
+ type: "internal" | "system" | "first_party" | "third_party";
541
+ name: string;
542
+ id: string;
543
+ clientId: string;
544
+ isOfficial: boolean;
545
+ isInternal: boolean;
546
+ scopes: string[];
547
+ description?: string | undefined;
548
+ icon?: string | undefined;
549
+ websiteUrl?: string | undefined;
550
+ privacyPolicyUrl?: string | undefined;
551
+ termsUrl?: string | undefined;
552
+ developerName?: string | undefined;
553
+ };
554
+ }, {
555
+ application: {
556
+ type: "internal" | "system" | "first_party" | "third_party";
557
+ name: string;
558
+ id: string;
559
+ clientId: string;
560
+ isOfficial: boolean;
561
+ isInternal: boolean;
562
+ scopes: string[];
563
+ description?: string | undefined;
564
+ icon?: string | undefined;
565
+ websiteUrl?: string | undefined;
566
+ privacyPolicyUrl?: string | undefined;
567
+ termsUrl?: string | undefined;
568
+ developerName?: string | undefined;
569
+ };
570
+ }>;
571
+ export declare const mcpOAuthConsentResponseSchema: z.ZodObject<{
572
+ consentRequired: z.ZodBoolean;
573
+ context: z.ZodObject<{
574
+ client: z.ZodObject<{
575
+ id: z.ZodString;
576
+ name: z.ZodString;
577
+ description: z.ZodOptional<z.ZodString>;
578
+ icon: z.ZodOptional<z.ZodString>;
579
+ websiteUrl: z.ZodOptional<z.ZodString>;
580
+ privacyPolicyUrl: z.ZodOptional<z.ZodString>;
581
+ termsUrl: z.ZodOptional<z.ZodString>;
582
+ type: z.ZodEnum<["first_party", "third_party", "internal", "system"]>;
583
+ isOfficial: z.ZodBoolean;
584
+ isInternal: z.ZodBoolean;
585
+ scopes: z.ZodArray<z.ZodString, "many">;
586
+ developerName: z.ZodOptional<z.ZodString>;
587
+ } & {
588
+ clientId: z.ZodString;
589
+ }, "strict", z.ZodTypeAny, {
590
+ type: "internal" | "system" | "first_party" | "third_party";
591
+ name: string;
592
+ id: string;
593
+ clientId: string;
594
+ isOfficial: boolean;
595
+ isInternal: boolean;
596
+ scopes: string[];
597
+ description?: string | undefined;
598
+ icon?: string | undefined;
599
+ websiteUrl?: string | undefined;
600
+ privacyPolicyUrl?: string | undefined;
601
+ termsUrl?: string | undefined;
602
+ developerName?: string | undefined;
603
+ }, {
604
+ type: "internal" | "system" | "first_party" | "third_party";
605
+ name: string;
606
+ id: string;
607
+ clientId: string;
608
+ isOfficial: boolean;
609
+ isInternal: boolean;
610
+ scopes: string[];
611
+ description?: string | undefined;
612
+ icon?: string | undefined;
613
+ websiteUrl?: string | undefined;
614
+ privacyPolicyUrl?: string | undefined;
615
+ termsUrl?: string | undefined;
616
+ developerName?: string | undefined;
617
+ }>;
618
+ account: z.ZodObject<{
619
+ id: z.ZodString;
620
+ displayName: z.ZodOptional<z.ZodString>;
621
+ handle: z.ZodOptional<z.ZodString>;
622
+ avatar: z.ZodOptional<z.ZodString>;
623
+ }, "strict", z.ZodTypeAny, {
624
+ id: string;
625
+ displayName?: string | undefined;
626
+ avatar?: string | undefined;
627
+ handle?: string | undefined;
628
+ }, {
629
+ id: string;
630
+ displayName?: string | undefined;
631
+ avatar?: string | undefined;
632
+ handle?: string | undefined;
633
+ }>;
634
+ resource: z.ZodObject<{
635
+ appId: z.ZodString;
636
+ uri: z.ZodString;
637
+ application: z.ZodObject<{
638
+ id: z.ZodString;
639
+ name: z.ZodString;
640
+ description: z.ZodOptional<z.ZodString>;
641
+ icon: z.ZodOptional<z.ZodString>;
642
+ websiteUrl: z.ZodOptional<z.ZodString>;
643
+ privacyPolicyUrl: z.ZodOptional<z.ZodString>;
644
+ termsUrl: z.ZodOptional<z.ZodString>;
645
+ type: z.ZodEnum<["first_party", "third_party", "internal", "system"]>;
646
+ isOfficial: z.ZodBoolean;
647
+ isInternal: z.ZodBoolean;
648
+ scopes: z.ZodArray<z.ZodString, "many">;
649
+ developerName: z.ZodOptional<z.ZodString>;
650
+ }, "strip", z.ZodTypeAny, {
651
+ type: "internal" | "system" | "first_party" | "third_party";
652
+ name: string;
653
+ id: string;
654
+ isOfficial: boolean;
655
+ isInternal: boolean;
656
+ scopes: string[];
657
+ description?: string | undefined;
658
+ icon?: string | undefined;
659
+ websiteUrl?: string | undefined;
660
+ privacyPolicyUrl?: string | undefined;
661
+ termsUrl?: string | undefined;
662
+ developerName?: string | undefined;
663
+ }, {
664
+ type: "internal" | "system" | "first_party" | "third_party";
665
+ name: string;
666
+ id: string;
667
+ isOfficial: boolean;
668
+ isInternal: boolean;
669
+ scopes: string[];
670
+ description?: string | undefined;
671
+ icon?: string | undefined;
672
+ websiteUrl?: string | undefined;
673
+ privacyPolicyUrl?: string | undefined;
674
+ termsUrl?: string | undefined;
675
+ developerName?: string | undefined;
676
+ }>;
677
+ }, "strict", z.ZodTypeAny, {
678
+ appId: string;
679
+ application: {
680
+ type: "internal" | "system" | "first_party" | "third_party";
681
+ name: string;
682
+ id: string;
683
+ isOfficial: boolean;
684
+ isInternal: boolean;
685
+ scopes: string[];
686
+ description?: string | undefined;
687
+ icon?: string | undefined;
688
+ websiteUrl?: string | undefined;
689
+ privacyPolicyUrl?: string | undefined;
690
+ termsUrl?: string | undefined;
691
+ developerName?: string | undefined;
692
+ };
693
+ uri: string;
694
+ }, {
695
+ appId: string;
696
+ application: {
697
+ type: "internal" | "system" | "first_party" | "third_party";
698
+ name: string;
699
+ id: string;
700
+ isOfficial: boolean;
701
+ isInternal: boolean;
702
+ scopes: string[];
703
+ description?: string | undefined;
704
+ icon?: string | undefined;
705
+ websiteUrl?: string | undefined;
706
+ privacyPolicyUrl?: string | undefined;
707
+ termsUrl?: string | undefined;
708
+ developerName?: string | undefined;
709
+ };
710
+ uri: string;
711
+ }>;
712
+ capabilities: z.ZodArray<z.ZodString, "many">;
713
+ writeActions: z.ZodArray<z.ZodEffects<z.ZodObject<Pick<{
714
+ name: z.ZodString;
715
+ version: z.ZodString;
716
+ description: z.ZodString;
717
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
718
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
719
+ capabilityPackage: z.ZodEnum<["read", "create", "publish", "communicate", "administer", "finance", "security", "delegate"]>;
720
+ requiredCapabilities: z.ZodArray<z.ZodString, "many">;
721
+ resourceTypes: z.ZodArray<z.ZodString, "many">;
722
+ effect: z.ZodEnum<["read", "write", "external", "financial", "security"]>;
723
+ idempotency: z.ZodEnum<["none", "supported", "required"]>;
724
+ rollback: z.ZodEnum<["none", "manual", "supported"]>;
725
+ exposure: z.ZodArray<z.ZodEnum<["internal", "mcp"]>, "many">;
726
+ limitKeys: z.ZodDefault<z.ZodArray<z.ZodObject<{
727
+ key: z.ZodString;
728
+ kind: z.ZodEnum<["maximum_number", "exact_boolean"]>;
729
+ }, "strict", z.ZodTypeAny, {
730
+ kind: "maximum_number" | "exact_boolean";
731
+ key: string;
732
+ }, {
733
+ kind: "maximum_number" | "exact_boolean";
734
+ key: string;
735
+ }>, "many">>;
736
+ invocation: z.ZodObject<{
737
+ method: z.ZodEnum<["GET", "POST", "PATCH", "PUT", "DELETE"]>;
738
+ path: z.ZodString;
739
+ }, "strict", z.ZodTypeAny, {
740
+ path: string;
741
+ method: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
742
+ }, {
743
+ path: string;
744
+ method: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
745
+ }>;
746
+ }, "effect" | "name" | "description" | "version" | "requiredCapabilities">, "strict", z.ZodTypeAny, {
747
+ effect: "security" | "read" | "write" | "external" | "financial";
748
+ name: string;
749
+ description: string;
750
+ version: string;
751
+ requiredCapabilities: string[];
752
+ }, {
753
+ effect: "security" | "read" | "write" | "external" | "financial";
754
+ name: string;
755
+ description: string;
756
+ version: string;
757
+ requiredCapabilities: string[];
758
+ }>, {
759
+ effect: "security" | "read" | "write" | "external" | "financial";
760
+ name: string;
761
+ description: string;
762
+ version: string;
763
+ requiredCapabilities: string[];
764
+ }, {
765
+ effect: "security" | "read" | "write" | "external" | "financial";
766
+ name: string;
767
+ description: string;
768
+ version: string;
769
+ requiredCapabilities: string[];
770
+ }>, "many">;
771
+ }, "strict", z.ZodTypeAny, {
772
+ resource: {
773
+ appId: string;
774
+ application: {
775
+ type: "internal" | "system" | "first_party" | "third_party";
776
+ name: string;
777
+ id: string;
778
+ isOfficial: boolean;
779
+ isInternal: boolean;
780
+ scopes: string[];
781
+ description?: string | undefined;
782
+ icon?: string | undefined;
783
+ websiteUrl?: string | undefined;
784
+ privacyPolicyUrl?: string | undefined;
785
+ termsUrl?: string | undefined;
786
+ developerName?: string | undefined;
787
+ };
788
+ uri: string;
789
+ };
790
+ capabilities: string[];
791
+ account: {
792
+ id: string;
793
+ displayName?: string | undefined;
794
+ avatar?: string | undefined;
795
+ handle?: string | undefined;
796
+ };
797
+ client: {
798
+ type: "internal" | "system" | "first_party" | "third_party";
799
+ name: string;
800
+ id: string;
801
+ clientId: string;
802
+ isOfficial: boolean;
803
+ isInternal: boolean;
804
+ scopes: string[];
805
+ description?: string | undefined;
806
+ icon?: string | undefined;
807
+ websiteUrl?: string | undefined;
808
+ privacyPolicyUrl?: string | undefined;
809
+ termsUrl?: string | undefined;
810
+ developerName?: string | undefined;
811
+ };
812
+ writeActions: {
813
+ effect: "security" | "read" | "write" | "external" | "financial";
814
+ name: string;
815
+ description: string;
816
+ version: string;
817
+ requiredCapabilities: string[];
818
+ }[];
819
+ }, {
820
+ resource: {
821
+ appId: string;
822
+ application: {
823
+ type: "internal" | "system" | "first_party" | "third_party";
824
+ name: string;
825
+ id: string;
826
+ isOfficial: boolean;
827
+ isInternal: boolean;
828
+ scopes: string[];
829
+ description?: string | undefined;
830
+ icon?: string | undefined;
831
+ websiteUrl?: string | undefined;
832
+ privacyPolicyUrl?: string | undefined;
833
+ termsUrl?: string | undefined;
834
+ developerName?: string | undefined;
835
+ };
836
+ uri: string;
837
+ };
838
+ capabilities: string[];
839
+ account: {
840
+ id: string;
841
+ displayName?: string | undefined;
842
+ avatar?: string | undefined;
843
+ handle?: string | undefined;
844
+ };
845
+ client: {
846
+ type: "internal" | "system" | "first_party" | "third_party";
847
+ name: string;
848
+ id: string;
849
+ clientId: string;
850
+ isOfficial: boolean;
851
+ isInternal: boolean;
852
+ scopes: string[];
853
+ description?: string | undefined;
854
+ icon?: string | undefined;
855
+ websiteUrl?: string | undefined;
856
+ privacyPolicyUrl?: string | undefined;
857
+ termsUrl?: string | undefined;
858
+ developerName?: string | undefined;
859
+ };
860
+ writeActions: {
861
+ effect: "security" | "read" | "write" | "external" | "financial";
862
+ name: string;
863
+ description: string;
864
+ version: string;
865
+ requiredCapabilities: string[];
866
+ }[];
867
+ }>;
868
+ }, "strict", z.ZodTypeAny, {
869
+ context: {
870
+ resource: {
871
+ appId: string;
872
+ application: {
873
+ type: "internal" | "system" | "first_party" | "third_party";
874
+ name: string;
875
+ id: string;
876
+ isOfficial: boolean;
877
+ isInternal: boolean;
878
+ scopes: string[];
879
+ description?: string | undefined;
880
+ icon?: string | undefined;
881
+ websiteUrl?: string | undefined;
882
+ privacyPolicyUrl?: string | undefined;
883
+ termsUrl?: string | undefined;
884
+ developerName?: string | undefined;
885
+ };
886
+ uri: string;
887
+ };
888
+ capabilities: string[];
889
+ account: {
890
+ id: string;
891
+ displayName?: string | undefined;
892
+ avatar?: string | undefined;
893
+ handle?: string | undefined;
894
+ };
895
+ client: {
896
+ type: "internal" | "system" | "first_party" | "third_party";
897
+ name: string;
898
+ id: string;
899
+ clientId: string;
900
+ isOfficial: boolean;
901
+ isInternal: boolean;
902
+ scopes: string[];
903
+ description?: string | undefined;
904
+ icon?: string | undefined;
905
+ websiteUrl?: string | undefined;
906
+ privacyPolicyUrl?: string | undefined;
907
+ termsUrl?: string | undefined;
908
+ developerName?: string | undefined;
909
+ };
910
+ writeActions: {
911
+ effect: "security" | "read" | "write" | "external" | "financial";
912
+ name: string;
913
+ description: string;
914
+ version: string;
915
+ requiredCapabilities: string[];
916
+ }[];
917
+ };
918
+ consentRequired: boolean;
919
+ }, {
920
+ context: {
921
+ resource: {
922
+ appId: string;
923
+ application: {
924
+ type: "internal" | "system" | "first_party" | "third_party";
925
+ name: string;
926
+ id: string;
927
+ isOfficial: boolean;
928
+ isInternal: boolean;
929
+ scopes: string[];
930
+ description?: string | undefined;
931
+ icon?: string | undefined;
932
+ websiteUrl?: string | undefined;
933
+ privacyPolicyUrl?: string | undefined;
934
+ termsUrl?: string | undefined;
935
+ developerName?: string | undefined;
936
+ };
937
+ uri: string;
938
+ };
939
+ capabilities: string[];
940
+ account: {
941
+ id: string;
942
+ displayName?: string | undefined;
943
+ avatar?: string | undefined;
944
+ handle?: string | undefined;
945
+ };
946
+ client: {
947
+ type: "internal" | "system" | "first_party" | "third_party";
948
+ name: string;
949
+ id: string;
950
+ clientId: string;
951
+ isOfficial: boolean;
952
+ isInternal: boolean;
953
+ scopes: string[];
954
+ description?: string | undefined;
955
+ icon?: string | undefined;
956
+ websiteUrl?: string | undefined;
957
+ privacyPolicyUrl?: string | undefined;
958
+ termsUrl?: string | undefined;
959
+ developerName?: string | undefined;
960
+ };
961
+ writeActions: {
962
+ effect: "security" | "read" | "write" | "external" | "financial";
963
+ name: string;
964
+ description: string;
965
+ version: string;
966
+ requiredCapabilities: string[];
967
+ }[];
968
+ };
969
+ consentRequired: boolean;
970
+ }>;
85
971
  export type OauthConsentDecision = z.infer<typeof oauthConsentDecisionSchema>;
86
972
  export type OauthAuthorizeCodeResponse = z.infer<typeof oauthAuthorizeCodeResponseSchema>;
973
+ export type McpOAuthClientApplication = z.infer<typeof mcpOAuthClientApplicationSchema>;
974
+ export type McpOAuthWriteAction = z.infer<typeof mcpOAuthWriteActionSchema>;
975
+ export type McpOAuthConsentContext = z.infer<typeof mcpOAuthConsentContextSchema>;
976
+ export type McpOAuthClientInfoResponse = z.infer<typeof mcpOAuthClientInfoResponseSchema>;
977
+ export type McpOAuthConsentResponse = z.infer<typeof mcpOAuthConsentResponseSchema>;