UNPKG

@contiva/sap-integration-suite-client

Version:
120 lines (119 loc) 4.64 kB
/** * SAP B2B Scenarios Client * * This file contains a client class for interacting with the * B2B Scenarios API of SAP Cloud Integration. This API allows access to * business documents, orphaned interchanges, acknowledgements, and related data * in B2B integration scenarios. * * @module sap-integration-suite-client/b2b-scenarios */ import { Api as B2BScenariosApi, ComSapHciApiOrphanedInterchange, ComSapHciApiBusinessDocument } from '../types/sap.B2BScenarios'; /** * SAP B2B Scenarios Client * * Provides simplified access to the B2B Scenarios API. */ export declare class B2BScenariosClient { private api; private normalizer; /** * Creates a new B2BScenariosClient * * @param {B2BScenariosApi<unknown>} api - The underlying API instance */ constructor(api: B2BScenariosApi<unknown>); /** * Retrieves all orphaned interchanges. * * @param {Object} options Optional parameters for the request * @param {number} [options.top] Maximum number of entries to return * @param {number} [options.skip] Number of entries to skip * @param {string} [options.filter] OData filter expression * @returns {Promise<ComSapHciApiOrphanedInterchange[]>} Promise resolving to a list of orphaned interchanges * * @example * const orphanedInterchanges = await client.getOrphanedInterchanges({ top: 100 }); */ getOrphanedInterchanges(options?: { top?: number; skip?: number; filter?: string; }): Promise<ComSapHciApiOrphanedInterchange[]>; /** * Retrieves a specific orphaned interchange by ID. * * @param {string} id The ID of the orphaned interchange * @returns {Promise<ComSapHciApiOrphanedInterchange | undefined>} Promise resolving to the orphaned interchange * * @example * const orphanedInterchange = await client.getOrphanedInterchangeById('interchange-id'); */ getOrphanedInterchangeById(id: string): Promise<ComSapHciApiOrphanedInterchange | undefined>; /** * Retrieves all business documents. * * @param {Object} options Optional parameters for the request * @param {number} [options.top] Maximum number of entries to return * @param {number} [options.skip] Number of entries to skip * @param {string} [options.filter] OData filter expression * @returns {Promise<ComSapHciApiBusinessDocument[]>} Promise resolving to a list of business documents * * @example * const documents = await client.getBusinessDocuments({ * top: 50, * filter: "ProcessingStatus eq 'FAILED'" * }); */ getBusinessDocuments(options?: { top?: number; skip?: number; filter?: string; }): Promise<ComSapHciApiBusinessDocument[]>; /** * Retrieves a specific business document by ID. * * @param {string} id The ID of the business document * @returns {Promise<ComSapHciApiBusinessDocument | undefined>} Promise resolving to the business document * * @example * const document = await client.getBusinessDocumentById('doc-id'); */ getBusinessDocumentById(id: string): Promise<ComSapHciApiBusinessDocument | undefined>; /** * Downloads a specific business document payload. * * @param {string} payloadId The ID of the payload * @returns {Promise<any>} Promise resolving to the payload content * * @example * const payloadContent = await client.getBusinessDocumentPayloadContent('payload-id'); */ getBusinessDocumentPayloadContent(payloadId: string): Promise<any>; /** * Downloads a specific technical acknowledgement payload. * * @param {string} ackId The ID of the technical acknowledgement * @returns {Promise<any>} Promise resolving to the acknowledgement content * * @example * const ackContent = await client.getTechnicalAcknowledgementContent('ack-id'); */ getTechnicalAcknowledgementContent(ackId: string): Promise<any>; /** * Downloads a specific functional acknowledgement payload. * * @param {string} ackId The ID of the functional acknowledgement * @returns {Promise<any>} Promise resolving to the acknowledgement content * * @example * const ackContent = await client.getFunctionalAcknowledgementContent('ack-id'); */ getFunctionalAcknowledgementContent(ackId: string): Promise<any>; /** * Returns the underlying API instance for advanced usage. * * @returns {B2BScenariosApi<unknown>} The underlying API instance */ getApi(): B2BScenariosApi<unknown>; }