@wildo-ai/external-connectors-models 1.1.11 → 1.1.13

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.
Files changed (109) hide show
  1. package/dist/esm/companion-exports.d.ts.map +1 -1
  2. package/dist/esm/companion-exports.js.map +1 -1
  3. package/dist/esm/core/commons.external-connectors-models.schemas.d.ts +10 -0
  4. package/dist/esm/core/commons.external-connectors-models.schemas.d.ts.map +1 -1
  5. package/dist/esm/core/commons.external-connectors-models.schemas.js +10 -0
  6. package/dist/esm/core/commons.external-connectors-models.schemas.js.map +1 -1
  7. package/dist/esm/core/oauth2.enums.d.ts.map +1 -1
  8. package/dist/esm/core/oauth2.enums.js.map +1 -1
  9. package/dist/esm/core/operation-classification.external-connectors-models.schemas.d.ts.map +1 -1
  10. package/dist/esm/core/operation-classification.external-connectors-models.schemas.js.map +1 -1
  11. package/dist/esm/core/operations.external-connectors-models.schemas.d.ts.map +1 -1
  12. package/dist/esm/core/operations.external-connectors-models.schemas.js.map +1 -1
  13. package/dist/esm/core/security.external-connectors-models.schemas.d.ts.map +1 -1
  14. package/dist/esm/core/security.external-connectors-models.schemas.js.map +1 -1
  15. package/dist/esm/index.d.ts +6 -0
  16. package/dist/esm/index.d.ts.map +1 -1
  17. package/dist/esm/index.js +6 -0
  18. package/dist/esm/index.js.map +1 -1
  19. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts +20 -46
  20. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts.map +1 -1
  21. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js +34 -5
  22. package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js.map +1 -1
  23. package/dist/esm/protocols/billing.standard-interface.schemas.d.ts +56 -3
  24. package/dist/esm/protocols/billing.standard-interface.schemas.d.ts.map +1 -1
  25. package/dist/esm/protocols/billing.standard-interface.schemas.js +15 -2
  26. package/dist/esm/protocols/billing.standard-interface.schemas.js.map +1 -1
  27. package/dist/esm/protocols/content-safety.external-connectors-models.schemas.d.ts.map +1 -1
  28. package/dist/esm/protocols/content-safety.external-connectors-models.schemas.js.map +1 -1
  29. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts.map +1 -1
  30. package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js.map +1 -1
  31. package/dist/esm/protocols/electronic-signature.external-connectors-models.schemas.d.ts +157 -0
  32. package/dist/esm/protocols/electronic-signature.external-connectors-models.schemas.d.ts.map +1 -0
  33. package/dist/esm/protocols/electronic-signature.external-connectors-models.schemas.js +134 -0
  34. package/dist/esm/protocols/electronic-signature.external-connectors-models.schemas.js.map +1 -0
  35. package/dist/esm/protocols/email-inbound.standard-interface.schemas.d.ts +85 -0
  36. package/dist/esm/protocols/email-inbound.standard-interface.schemas.d.ts.map +1 -1
  37. package/dist/esm/protocols/email-inbound.standard-interface.schemas.js +46 -2
  38. package/dist/esm/protocols/email-inbound.standard-interface.schemas.js.map +1 -1
  39. package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts.map +1 -1
  40. package/dist/esm/protocols/email.external-connectors-models.schemas.js.map +1 -1
  41. package/dist/esm/protocols/email.standard-interface.schemas.d.ts.map +1 -1
  42. package/dist/esm/protocols/email.standard-interface.schemas.js.map +1 -1
  43. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts +49 -6
  44. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts.map +1 -1
  45. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js +89 -6
  46. package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js.map +1 -1
  47. package/dist/esm/protocols/file-storage.standard-interface.d.ts +9 -2
  48. package/dist/esm/protocols/file-storage.standard-interface.d.ts.map +1 -1
  49. package/dist/esm/protocols/file-storage.standard-interface.js +6 -0
  50. package/dist/esm/protocols/file-storage.standard-interface.js.map +1 -1
  51. package/dist/esm/protocols/frontend.external-connectors-models.schemas.d.ts.map +1 -1
  52. package/dist/esm/protocols/frontend.external-connectors-models.schemas.js.map +1 -1
  53. package/dist/esm/protocols/graphql-operations.external-connectors-models.schemas.d.ts +254 -0
  54. package/dist/esm/protocols/graphql-operations.external-connectors-models.schemas.d.ts.map +1 -0
  55. package/dist/esm/protocols/graphql-operations.external-connectors-models.schemas.js +480 -0
  56. package/dist/esm/protocols/graphql-operations.external-connectors-models.schemas.js.map +1 -0
  57. package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.d.ts.map +1 -1
  58. package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.js.map +1 -1
  59. package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts +95 -1
  60. package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts.map +1 -1
  61. package/dist/esm/protocols/hooks.external-connectors-models.schemas.js +110 -0
  62. package/dist/esm/protocols/hooks.external-connectors-models.schemas.js.map +1 -1
  63. package/dist/esm/protocols/image.external-connectors-models.schemas.d.ts.map +1 -1
  64. package/dist/esm/protocols/image.external-connectors-models.schemas.js.map +1 -1
  65. package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts +95 -3
  66. package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts.map +1 -1
  67. package/dist/esm/protocols/llm.external-connectors-models.schemas.js +147 -15
  68. package/dist/esm/protocols/llm.external-connectors-models.schemas.js.map +1 -1
  69. package/dist/esm/protocols/oauth2-provider-assurance.definitions.d.ts.map +1 -1
  70. package/dist/esm/protocols/oauth2-provider-assurance.definitions.js.map +1 -1
  71. package/dist/esm/protocols/oauth2-provider-assurance.schemas.d.ts.map +1 -1
  72. package/dist/esm/protocols/oauth2-provider-assurance.schemas.js.map +1 -1
  73. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts.map +1 -1
  74. package/dist/esm/protocols/oauth2.external-connectors-models.schemas.js.map +1 -1
  75. package/dist/esm/protocols/provider-configuration-authoring.external-connectors-models.schemas.d.ts +52 -0
  76. package/dist/esm/protocols/provider-configuration-authoring.external-connectors-models.schemas.d.ts.map +1 -0
  77. package/dist/esm/protocols/provider-configuration-authoring.external-connectors-models.schemas.js +132 -0
  78. package/dist/esm/protocols/provider-configuration-authoring.external-connectors-models.schemas.js.map +1 -0
  79. package/dist/esm/protocols/provider-connection-parameters.external-connectors-models.d.ts +111 -0
  80. package/dist/esm/protocols/provider-connection-parameters.external-connectors-models.d.ts.map +1 -0
  81. package/dist/esm/protocols/provider-connection-parameters.external-connectors-models.js +203 -0
  82. package/dist/esm/protocols/provider-connection-parameters.external-connectors-models.js.map +1 -0
  83. package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.d.ts +6 -0
  84. package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.d.ts.map +1 -1
  85. package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.js +13 -7
  86. package/dist/esm/protocols/provider-oauth2-token-endpoint-hosts.external-connectors-models.js.map +1 -1
  87. package/dist/esm/protocols/provider-vendor-registration.external-connectors-models.d.ts +50 -0
  88. package/dist/esm/protocols/provider-vendor-registration.external-connectors-models.d.ts.map +1 -0
  89. package/dist/esm/protocols/provider-vendor-registration.external-connectors-models.js +30 -0
  90. package/dist/esm/protocols/provider-vendor-registration.external-connectors-models.js.map +1 -0
  91. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts +730 -17
  92. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts.map +1 -1
  93. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js +822 -20
  94. package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js.map +1 -1
  95. package/dist/esm/protocols/service-account-token.external-connectors-models.schemas.d.ts +73 -0
  96. package/dist/esm/protocols/service-account-token.external-connectors-models.schemas.d.ts.map +1 -0
  97. package/dist/esm/protocols/service-account-token.external-connectors-models.schemas.js +82 -0
  98. package/dist/esm/protocols/service-account-token.external-connectors-models.schemas.js.map +1 -0
  99. package/dist/esm/protocols/sms.external-connectors-models.schemas.d.ts.map +1 -1
  100. package/dist/esm/protocols/sms.external-connectors-models.schemas.js.map +1 -1
  101. package/dist/esm/protocols/sms.standard-interface.schemas.d.ts +79 -1
  102. package/dist/esm/protocols/sms.standard-interface.schemas.d.ts.map +1 -1
  103. package/dist/esm/protocols/sms.standard-interface.schemas.js +93 -0
  104. package/dist/esm/protocols/sms.standard-interface.schemas.js.map +1 -1
  105. package/dist/esm/protocols/subject-erasure-effect.standard-interface.d.ts.map +1 -1
  106. package/dist/esm/protocols/subject-erasure-effect.standard-interface.js.map +1 -1
  107. package/dist/tsconfig.build.tsbuildinfo +1 -1
  108. package/package.json +5 -5
  109. package/dist/esm/.native.tsbuildinfo +0 -1
@@ -0,0 +1,254 @@
1
+ /**
2
+ * GRAPHQL provider operations (#3392): an operation whose provider-owned part is a GraphQL document, and whose input is
3
+ * the document's VARIABLES.
4
+ *
5
+ * A REST operation is a method, a path and a body built from the caller's input. A GraphQL vendor (GitHub v4, Linear,
6
+ * Shopify Admin, monday.com) exposes ONE endpoint and tells operations apart by the query document sent to it. Written
7
+ * as a REST operation, the document had to be an input, which handed the caller the vendor's whole schema and made every
8
+ * operation the same operation. Here the PROVIDER owns the document (`graphql.document`, with its `operationName`), and
9
+ * the caller supplies only values for the variables that document declares.
10
+ *
11
+ * ## The wire, settled by the GraphQL-over-HTTP specification
12
+ *
13
+ * The request is a POST whose JSON body holds `query` (the document), `operationName` and `variables`. The client
14
+ * accepts `application/graphql-response+json` first and `application/json` after it, because the vendor's support for
15
+ * the newer media type is unknown.
16
+ * spec-cite: GraphQL over HTTP, Current Working Draft (https://graphql.github.io/graphql-over-http/draft/, fetched
17
+ * 2026-11-09) — §4.1 lists the request parameters `query` (required), `operationName`, `variables` and `extensions`;
18
+ * §4.4 "A server MUST support POST requests with a body encoded as UTF-8 JSON, using the `application/json` media type";
19
+ * §4.2 "the client SHOULD set the Accept header to application/graphql-response+json, application/json;q=0.9".
20
+ *
21
+ * ## The answer: errors arrive IN BAND, on a 2xx
22
+ *
23
+ * A GraphQL server reports most failures inside a successful HTTP answer, in an `errors` list beside (or instead of)
24
+ * `data`. Read as REST, such an answer is a success, so a refused call would be returned to its caller as a result. The
25
+ * rule here, which {@link readProviderGraphqlResponse} applies and the engine's transport enforces on every GraphQL call:
26
+ *
27
+ * | the answer | verdict |
28
+ * |---|---|
29
+ * | `data` is an object, no `errors` (or an empty list) | SUCCEEDED; the output is read from `data` |
30
+ * | `errors`, and no `data` entry | REQUEST_ERROR: the server refused before executing anything |
31
+ * | `errors`, and a `data` entry (null or partial) | EXECUTION_ERROR: execution began and a field failed |
32
+ * | neither a `data` object nor `errors` | UNSTATED: the answer does not say what happened |
33
+ * | `data`, no `errors`, and the mutation's declared `payloadRefusal` says refused | PAYLOAD_REFUSED: the vendor did not do the write |
34
+ *
35
+ * spec-cite: GraphQL, September 2025 edition (https://spec.graphql.org/September2025/, fetched 2026-11-09) — §7.1.1
36
+ * "If execution raised any errors, the execution result must contain an entry with key "errors"" and "The value of this
37
+ * entry must be a non-empty list"; §7.1.3 "The request error result map must not contain an entry with key "data""; §7.1.5
38
+ * "If an error was raised during the execution that prevented a valid response, the "data" entry in the response should
39
+ * be null"; §6.3.4 (mutation) "the selections in the top most selection set will be executed in serial order".
40
+ * spec-cite: https://docs.github.com/en/graphql/overview/rate-limits-and-query-limits-for-the-graphql-api — for the
41
+ * primary rate limit "the response status will still be `200`", fetched 2026-11-09: a 200 is not a success.
42
+ *
43
+ * PARTIAL DATA IS NEVER RETURNED AS A RESULT. Any error fails the call, whatever `data` holds, because a caller handed a
44
+ * partial object cannot tell a field the vendor left null from a field that failed. For a MUTATION whose execution began,
45
+ * the failure says the outcome is UNKNOWN: the root fields run in order and an error in one does not undo the ones
46
+ * before it, so whether the change landed is not stated. A request error (no `data`) applied nothing, mutation or not.
47
+ *
48
+ * ## What is not checked here
49
+ *
50
+ * The document is checked for its SHAPE (it parses into exactly one operation of the declared name and type, and its
51
+ * variables are the input's fields). It is not validated against the vendor's schema here: publish does that, against
52
+ * the schema the module pins as `provider.graphqlSchema` (#3392, the counterpart of the OpenAPI conformance check of
53
+ * #2028). The OpenAPI conformance check skips a GraphQL operation, since an OpenAPI description does not describe a
54
+ * GraphQL endpoint.
55
+ */
56
+ import { type ProviderRestOperation } from './rest-operations.external-connectors-models.schemas';
57
+ /** @wildo_source:part:start external-connectors.models.rest-operation-contract facet:layer:shared facet:family:provider facet:audience:app-developer */
58
+ /**
59
+ * The GraphQL document a provider operation sends (#3392), set as `ProviderRestOperation.graphql`.
60
+ *
61
+ * With it the operation is a GraphQL call: `method` must be `POST`, `pathTemplate` is the vendor's GraphQL endpoint
62
+ * (`/graphql`), and the operation's input IS the variables. So it may declare no `requestBody`, and no parameter fed by
63
+ * the input (a `constantValue` header or path parameter, such as a pinned API version, is allowed). `inputSchema`
64
+ * describes the variables, one top-level field per variable the document declares, and `inputOptions` work on them as on
65
+ * any input. `resultPath` and `outputSchema` read the answer's `data`, never the `{ data, errors }` envelope around it.
66
+ * `responseDecoding` stays JSON.
67
+ *
68
+ * Checked when the catalogue loads, at publish and on every call ({@link describeProviderRestOperationGraphqlDefects}).
69
+ *
70
+ * @example
71
+ * // GitHub: a repository's discussions, which GitHub serves through GraphQL only.
72
+ * {
73
+ * operationId: 'github_issues_list_discussions', domain: 'default', method: API_HttpMethod.POST, pathTemplate: '/graphql',
74
+ * classification: ExternalOperation_Classification.READ,
75
+ * graphql: {
76
+ * operationName: 'ListDiscussions',
77
+ * document: 'query ListDiscussions($owner: String!, $repo: String!, $first: Int!) { repository(owner: $owner, name: $repo) { discussions(first: $first) { nodes { number title } } } }',
78
+ * },
79
+ * inputSchema: z.strictObject({ owner: z.string(), repo: z.string(), first: z.number().int() }),
80
+ * resultPath: 'repository.discussions',
81
+ * }
82
+ */
83
+ export interface ProviderRestOperationGraphql {
84
+ /**
85
+ * The executable document, owned by the provider: exactly ONE operation (a `query` or a `mutation`, named
86
+ * {@link operationName}) and any fragments it uses. A `query` is a READ operation and a `mutation` a WRITE; a
87
+ * `subscription` is refused, since it is not answered over a single POST.
88
+ */
89
+ readonly document: string;
90
+ /** The operation's name in {@link document}, sent as `operationName`. */
91
+ readonly operationName: string;
92
+ /**
93
+ * Dot path, inside EACH error of the answer's `errors` list, to the vendor's machine-readable code (`extensions.code`
94
+ * by convention, where a vendor uses it). The specification standardizes no code, so absent, no code is read and the
95
+ * failure carries the vendor's messages only. A code is kept only when it is code-shaped, as every vendor code is.
96
+ */
97
+ readonly errorCodePath?: string;
98
+ /**
99
+ * The codes, read at {@link errorCodePath}, that mean the vendor refused the CREDENTIAL itself rather than the request
100
+ * (#3392): the stored credential is then recorded as rejected, as a REST vendor's
101
+ * `applicationOutcome.credentialRefusedErrorCodes` records it. A GraphQL vendor may name a dead or expired token inside
102
+ * a 200 (an error list beside or instead of `data`) or inside a 4xx carrying the same error list, and both are read.
103
+ * The failure itself is unchanged: the call fails with the vendor's code and is never retried.
104
+ *
105
+ * List only a code the vendor DOCUMENTS as a refused credential. A code for a resource the credential may not reach
106
+ * (`FORBIDDEN` on one repository), for a missing scope, or for a request sent with no credential at all, does not
107
+ * belong here: the credential still works, and recording it rejected would show a working connection as broken.
108
+ * Requires {@link errorCodePath}, without which no code is read and none could match.
109
+ *
110
+ * @example
111
+ * // monday.com answers a key it refuses with the error code `Unauthorized`, whose documented resolution is a valid key.
112
+ * // spec-cite: https://developer.monday.com/api-reference/docs/errors — the `Unauthorized` row (HTTP 401, resolution
113
+ * // "Input a valid API key."), fetched 2026-11-09.
114
+ * graphql: { operationName: 'CreateItem', document: CREATE_ITEM, errorCodePath: 'extensions.code', credentialRefusedErrorCodes: ['Unauthorized'] }
115
+ */
116
+ readonly credentialRefusedErrorCodes?: readonly string[];
117
+ /**
118
+ * Where a MUTATION's answer says the vendor refused it in the DATA rather than in `errors` (follow-up to #3392). Several
119
+ * GraphQL vendors answer a write they refused with a successful response whose payload carries the refusal: Shopify's
120
+ * `userErrors` list ("validation failures, such as invalid field values or business logic violations, that prevent the
121
+ * operation from completing"), Linear's `success: Boolean!`. Without it such an answer is returned as the result and a
122
+ * caller that does not read the payload takes a refused write for a done one; with it the call FAILS, carrying the
123
+ * vendor's messages, exactly as an `errors` entry does. See {@link ProviderGraphqlPayloadRefusal}.
124
+ * spec-cite: https://shopify.dev/docs/api/admin-graphql — the `UserError` description quoted above, fetched 2026-11-10.
125
+ *
126
+ * @example
127
+ * // Shopify: productCreate's userErrors, each `{ field, message }`.
128
+ * payloadRefusal: { kind: ProviderGraphqlPayloadRefusalKind.USER_ERRORS, path: 'productCreate.userErrors', messagePath: 'message', fieldPath: 'field' }
129
+ */
130
+ readonly payloadRefusal?: ProviderGraphqlPayloadRefusal;
131
+ }
132
+ /** How a mutation's payload states a refusal. See {@link ProviderRestOperationGraphql.payloadRefusal}. */
133
+ export declare enum ProviderGraphqlPayloadRefusalKind {
134
+ /** A list of the vendor's refusals (Shopify's `userErrors`): the write was refused when the list is not empty. */
135
+ USER_ERRORS = "user_errors",
136
+ /** A boolean the vendor sets to `false` when it did not do the write (Linear's `success`). */
137
+ SUCCESS_FLAG = "success_flag"
138
+ }
139
+ /**
140
+ * Where a mutation's payload states a refusal (follow-up to #3392). Every path is a dot path, `path` from the answer's
141
+ * `data` (as `resultPath` is), `messagePath`, `fieldPath` and `codePath` from inside each listed refusal.
142
+ *
143
+ * - {@link ProviderGraphqlPayloadRefusalKind.USER_ERRORS}: a non-empty list at `path` fails the call. Each entry's text at
144
+ * `messagePath` (`message` when absent) is kept, prefixed with the input field it names at `fieldPath` (a string or a
145
+ * list of path segments), and the first code-shaped value at `codePath` is the failure's code.
146
+ * - {@link ProviderGraphqlPayloadRefusalKind.SUCCESS_FLAG}: `false` at `path` fails the call.
147
+ *
148
+ * Anything else at `path` (an absent payload, `true`, an empty list) refuses nothing: the answer is read as it is.
149
+ */
150
+ export type ProviderGraphqlPayloadRefusal = {
151
+ readonly kind: ProviderGraphqlPayloadRefusalKind.USER_ERRORS;
152
+ readonly path: string;
153
+ readonly messagePath?: string;
154
+ readonly fieldPath?: string;
155
+ readonly codePath?: string;
156
+ } | {
157
+ readonly kind: ProviderGraphqlPayloadRefusalKind.SUCCESS_FLAG;
158
+ readonly path: string;
159
+ };
160
+ /** What a GraphQL document's operation does. A `subscription` is not served over a single POST, so it is no member. */
161
+ export declare enum ProviderGraphqlOperationType {
162
+ /** Reads. The operation must be classified READ. */
163
+ QUERY = "query",
164
+ /** Changes the vendor. The operation must be classified WRITE. */
165
+ MUTATION = "mutation"
166
+ }
167
+ /**
168
+ * The `Accept` a GraphQL call sends: the GraphQL response media type first, `application/json` for a server that predates
169
+ * it (GraphQL over HTTP §4.2, quoted in this module's header).
170
+ * semantic-literal-boundary: the media types GraphQL over HTTP names, sent on the wire.
171
+ */
172
+ export declare const PROVIDER_GRAPHQL_ACCEPT_HEADER = "application/graphql-response+json, application/json;q=0.9";
173
+ /** At most this many of the vendor's error messages are kept on a failure. */
174
+ export declare const PROVIDER_GRAPHQL_MAXIMUM_ERROR_MESSAGES = 10;
175
+ /** A kept error message is cut at this many characters. */
176
+ export declare const PROVIDER_GRAPHQL_MAXIMUM_ERROR_MESSAGE_LENGTH = 500;
177
+ /** One operation a document defines, as {@link readProviderGraphqlDocument} reads it. */
178
+ export interface ProviderGraphqlDocumentOperation {
179
+ /** `query`, `mutation` or `subscription`, as written (an anonymous `{ … }` is a query). */
180
+ readonly type: string;
181
+ /** Absent for an anonymous operation. */
182
+ readonly name?: string;
183
+ /** The variables it declares, without their `$`, in order. */
184
+ readonly variables: readonly string[];
185
+ }
186
+ /** What a document holds, or why it cannot be read. */
187
+ export interface ProviderGraphqlDocumentShape {
188
+ readonly operations: readonly ProviderGraphqlDocumentOperation[];
189
+ /** Set when the text is not a document of executable definitions. `operations` is then what was read before it. */
190
+ readonly defect?: string;
191
+ }
192
+ /**
193
+ * The executable definitions of a GraphQL document (#3392): each operation's type, name and declared variables. A
194
+ * fragment is skipped; a type-system definition (`type`, `schema`, …) is a defect, since a document sent to a server is
195
+ * executable only.
196
+ */
197
+ export declare function readProviderGraphqlDocument(document: string): ProviderGraphqlDocumentShape;
198
+ /**
199
+ * Why a GraphQL operation cannot be sent as declared, or an empty list (#3392). Empty for an operation without
200
+ * `graphql`. Checked where a catalogue loads (the operation executor, an augmentation merge), at `wildo registry publish`,
201
+ * and by the request compiler on every call, so the one rule refuses in every place:
202
+ *
203
+ * - the call is a POST with no `requestBody`, every parameter carries a `constantValue` (the input is the variables
204
+ * and nothing else), and the answer is read as JSON;
205
+ * - the document reads as exactly ONE operation, named `operationName`, beside any fragments;
206
+ * - a `query` is classified READ and a `mutation` WRITE; a `subscription` is refused;
207
+ * - each declared variable is a top-level field of `inputSchema`, and each top-level field is a declared variable, so no
208
+ * value a caller supplies is silently dropped (when `inputSchema` lists its fields; without one, the call refuses a
209
+ * value for a variable the document does not declare);
210
+ * - `errorCodePath` is a dot path;
211
+ * - each of `credentialRefusedErrorCodes` is code-shaped (a value of any other shape is never kept, so it could never
212
+ * match), and the list comes with an `errorCodePath` to read the code at;
213
+ * - a `payloadRefusal` belongs to a mutation, names a kind of its vocabulary, and reads every path as a dot path.
214
+ */
215
+ export declare function describeProviderRestOperationGraphqlDefects(operation: Pick<ProviderRestOperation, 'operationId' | 'method' | 'classification' | 'parameters' | 'requestBody' | 'responseDecoding' | 'binaryResponse' | 'inputSchema' | 'graphql'>): string[];
216
+ /** The variables a GraphQL operation's document declares, or `undefined` when the document cannot be read. */
217
+ export declare function providerGraphqlOperationVariables(graphql: ProviderRestOperationGraphql): readonly string[] | undefined;
218
+ /** What a GraphQL answer says about the call. See the table in this module's header. */
219
+ export declare enum ProviderGraphqlResponseOutcomeKind {
220
+ /** `data` is an object and no error was reported. */
221
+ SUCCEEDED = "succeeded",
222
+ /** Errors, and no `data` entry: the request was refused before anything executed. Nothing was applied. */
223
+ REQUEST_ERROR = "request_error",
224
+ /** Errors beside a `data` entry (null or partial): execution began and something failed. */
225
+ EXECUTION_ERROR = "execution_error",
226
+ /** Neither a `data` object nor an error list: the answer does not state what happened. */
227
+ UNSTATED = "unstated",
228
+ /**
229
+ * `data` and no `errors`, and the mutation's payload states the vendor refused it (its declared `payloadRefusal`): the
230
+ * write was not done, as the vendor says (follow-up to #3392).
231
+ */
232
+ PAYLOAD_REFUSED = "payload_refused"
233
+ }
234
+ /** What {@link readProviderGraphqlResponse} read. */
235
+ export interface ProviderGraphqlResponseVerdict {
236
+ readonly kind: ProviderGraphqlResponseOutcomeKind;
237
+ /** On SUCCEEDED, the answer's `data` object: what the operation's `resultPath` and `outputSchema` read. */
238
+ readonly data?: Readonly<Record<string, unknown>>;
239
+ /**
240
+ * The vendor's error messages, in its order, at most {@link PROVIDER_GRAPHQL_MAXIMUM_ERROR_MESSAGES}, each cut at
241
+ * {@link PROVIDER_GRAPHQL_MAXIMUM_ERROR_MESSAGE_LENGTH} characters. Vendor prose: it may quote what the call sent, so it
242
+ * travels to the caller and is never written to a log or an audit row by the engine.
243
+ */
244
+ readonly errorMessages?: readonly string[];
245
+ /** The first code-shaped value at the operation's `errorCodePath` among the errors, when one is declared and found. */
246
+ readonly errorCode?: string;
247
+ }
248
+ /**
249
+ * Reads a parsed GraphQL answer (#3392). The ONE reader: the engine's transport, for a 2xx and a non-2xx answer alike,
250
+ * and every test go through it. See the module header for the rule and its sources.
251
+ */
252
+ export declare function readProviderGraphqlResponse(body: unknown, errorCodePath?: string, payloadRefusal?: ProviderGraphqlPayloadRefusal): ProviderGraphqlResponseVerdict;
253
+ /** @wildo_source:part:end external-connectors.models.rest-operation-contract */
254
+ //# sourceMappingURL=graphql-operations.external-connectors-models.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql-operations.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../src/protocols/graphql-operations.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAKH,OAAO,EAAkE,KAAK,qBAA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