webdriver-bidi-permissions.d.ts 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /**
  2. * Copyright 2024 Google LLC.
  3. * Copyright (c) Microsoft Corporation.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /**
  18. * THIS FILE IS AUTOGENERATED by cddlconv 0.1.5.
  19. * Run `node tools/generate-bidi-types.mjs` to regenerate.
  20. * @see https://github.com/w3c/webdriver-bidi/blob/master/index.bs
  21. */
  22. import z from 'zod';
  23. export declare const PermissionsCommandSchema: z.ZodLazy<z.ZodLazy<z.ZodObject<{
  24. method: z.ZodLiteral<"permissions.setPermission">;
  25. params: z.ZodLazy<z.ZodObject<{
  26. descriptor: z.ZodLazy<z.ZodObject<{
  27. name: z.ZodString;
  28. }, "strip", z.ZodTypeAny, {
  29. name: string;
  30. }, {
  31. name: string;
  32. }>>;
  33. state: z.ZodLazy<z.ZodEnum<["granted", "denied", "prompt"]>>;
  34. origin: z.ZodString;
  35. userContext: z.ZodOptional<z.ZodString>;
  36. }, "strip", z.ZodTypeAny, {
  37. origin: string;
  38. descriptor: {
  39. name: string;
  40. };
  41. state: "granted" | "denied" | "prompt";
  42. userContext?: string | undefined;
  43. }, {
  44. origin: string;
  45. descriptor: {
  46. name: string;
  47. };
  48. state: "granted" | "denied" | "prompt";
  49. userContext?: string | undefined;
  50. }>>;
  51. }, "strip", z.ZodTypeAny, {
  52. params: {
  53. origin: string;
  54. descriptor: {
  55. name: string;
  56. };
  57. state: "granted" | "denied" | "prompt";
  58. userContext?: string | undefined;
  59. };
  60. method: "permissions.setPermission";
  61. }, {
  62. params: {
  63. origin: string;
  64. descriptor: {
  65. name: string;
  66. };
  67. state: "granted" | "denied" | "prompt";
  68. userContext?: string | undefined;
  69. };
  70. method: "permissions.setPermission";
  71. }>>>;
  72. export declare namespace Permissions {
  73. const PermissionDescriptorSchema: z.ZodLazy<z.ZodObject<{
  74. name: z.ZodString;
  75. }, "strip", z.ZodTypeAny, {
  76. name: string;
  77. }, {
  78. name: string;
  79. }>>;
  80. }
  81. export declare namespace Permissions {
  82. const PermissionStateSchema: z.ZodLazy<z.ZodEnum<["granted", "denied", "prompt"]>>;
  83. }
  84. export declare namespace Permissions {
  85. const SetPermissionSchema: z.ZodLazy<z.ZodObject<{
  86. method: z.ZodLiteral<"permissions.setPermission">;
  87. params: z.ZodLazy<z.ZodObject<{
  88. descriptor: z.ZodLazy<z.ZodObject<{
  89. name: z.ZodString;
  90. }, "strip", z.ZodTypeAny, {
  91. name: string;
  92. }, {
  93. name: string;
  94. }>>;
  95. state: z.ZodLazy<z.ZodEnum<["granted", "denied", "prompt"]>>;
  96. origin: z.ZodString;
  97. userContext: z.ZodOptional<z.ZodString>;
  98. }, "strip", z.ZodTypeAny, {
  99. origin: string;
  100. descriptor: {
  101. name: string;
  102. };
  103. state: "granted" | "denied" | "prompt";
  104. userContext?: string | undefined;
  105. }, {
  106. origin: string;
  107. descriptor: {
  108. name: string;
  109. };
  110. state: "granted" | "denied" | "prompt";
  111. userContext?: string | undefined;
  112. }>>;
  113. }, "strip", z.ZodTypeAny, {
  114. params: {
  115. origin: string;
  116. descriptor: {
  117. name: string;
  118. };
  119. state: "granted" | "denied" | "prompt";
  120. userContext?: string | undefined;
  121. };
  122. method: "permissions.setPermission";
  123. }, {
  124. params: {
  125. origin: string;
  126. descriptor: {
  127. name: string;
  128. };
  129. state: "granted" | "denied" | "prompt";
  130. userContext?: string | undefined;
  131. };
  132. method: "permissions.setPermission";
  133. }>>;
  134. }
  135. export declare namespace Permissions {
  136. const SetPermissionParametersSchema: z.ZodLazy<z.ZodObject<{
  137. descriptor: z.ZodLazy<z.ZodObject<{
  138. name: z.ZodString;
  139. }, "strip", z.ZodTypeAny, {
  140. name: string;
  141. }, {
  142. name: string;
  143. }>>;
  144. state: z.ZodLazy<z.ZodEnum<["granted", "denied", "prompt"]>>;
  145. origin: z.ZodString;
  146. userContext: z.ZodOptional<z.ZodString>;
  147. }, "strip", z.ZodTypeAny, {
  148. origin: string;
  149. descriptor: {
  150. name: string;
  151. };
  152. state: "granted" | "denied" | "prompt";
  153. userContext?: string | undefined;
  154. }, {
  155. origin: string;
  156. descriptor: {
  157. name: string;
  158. };
  159. state: "granted" | "denied" | "prompt";
  160. userContext?: string | undefined;
  161. }>>;
  162. }