operationSpec.d.ts 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import { OperationParameter, OperationQueryParameter, OperationURLParameter } from "./operationParameter";
  2. import { OperationResponse } from "./operationResponse";
  3. import { Serializer } from "./serializer";
  4. import { HttpMethods } from "./webResource";
  5. /**
  6. * A specification that defines an operation.
  7. */
  8. export interface OperationSpec {
  9. /**
  10. * The serializer to use in this operation.
  11. */
  12. readonly serializer: Serializer;
  13. /**
  14. * The HTTP method that should be used by requests for this operation.
  15. */
  16. readonly httpMethod: HttpMethods;
  17. /**
  18. * The URL that was provided in the service's specification. This will still have all of the URL
  19. * template variables in it. If this is not provided when the OperationSpec is created, then it
  20. * will be populated by a "baseUri" property on the ServiceClient.
  21. */
  22. readonly baseUrl?: string;
  23. /**
  24. * The fixed path for this operation's URL. This will still have all of the URL template variables
  25. * in it.
  26. */
  27. readonly path?: string;
  28. /**
  29. * The content type of the request body. This value will be used as the "Content-Type" header if
  30. * it is provided.
  31. */
  32. readonly contentType?: string;
  33. /**
  34. * The parameter that will be used to construct the HTTP request's body.
  35. */
  36. readonly requestBody?: OperationParameter;
  37. /**
  38. * Whether or not this operation uses XML request and response bodies.
  39. */
  40. readonly isXML?: boolean;
  41. /**
  42. * The parameters to the operation method that will be substituted into the constructed URL.
  43. */
  44. readonly urlParameters?: ReadonlyArray<OperationURLParameter>;
  45. /**
  46. * The parameters to the operation method that will be added to the constructed URL's query.
  47. */
  48. readonly queryParameters?: ReadonlyArray<OperationQueryParameter>;
  49. /**
  50. * The parameters to the operation method that will be converted to headers on the operation's
  51. * HTTP request.
  52. */
  53. readonly headerParameters?: ReadonlyArray<OperationParameter>;
  54. /**
  55. * The parameters to the operation method that will be used to create a formdata body for the
  56. * operation's HTTP request.
  57. */
  58. readonly formDataParameters?: ReadonlyArray<OperationParameter>;
  59. /**
  60. * The different types of responses that this operation can return based on what status code is
  61. * returned.
  62. */
  63. readonly responses: {
  64. [responseCode: string]: OperationResponse;
  65. };
  66. }
  67. export declare function isStreamOperation(operationSpec: OperationSpec): boolean;
  68. //# sourceMappingURL=operationSpec.d.ts.map