UNPKG

beckn-typescript

Version:

Beckn Protocol Client & Server Tools for Typescript

1,166 lines 86.5 kB
export default paths; export type paths = { "/search": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description BAP declares the customer's intent to buy/avail products or services */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["Search"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/select": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description BAP declares the customer's cart (or equivalent) created by selecting objects from the catalog */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["Select"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/init": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Initialize an order by providing billing and/or shipping details */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["Init"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/confirm": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Initialize an order by providing billing and/or shipping details */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["Confirm"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/status": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Fetch the latest order object */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["Status"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/track": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Track an active order */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["Track"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/cancel": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Cancel an order */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["Cancel"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/update": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Remove object */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["Update"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/rating": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Provide feedback on a service */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["Rating-2"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/support": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Contact support */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["Support-2"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/on_search": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description BPP sends its catalog in response to a search request. */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OnSearch"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/on_select": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Send draft order object with quoted price for selected items */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OnSelect"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/on_init": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Send order object with payment details updated */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OnInit"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/on_confirm": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Send active order object */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OnConfirm"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/on_track": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Send tracking details of an active order */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OnTrack"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/on_cancel": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Send cancellation request_id with reasons list in case of cancellation request. Else send cancelled order object */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OnCancel"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/on_update": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Returns updated service with updated runtime object */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OnUpdate"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/on_status": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Fetch the status of a Service */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OnStatus"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/on_rating": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Provide feedback on a service */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OnRating"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/on_support": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** @description Contact Support */ post: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["OnSupport"]; }; }; responses: { default: components["responses"]["Response"]; }; }; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; }; export type webhooks = Record<string, never>; export type components = { schemas: { /** @description Standard code representing the domain. The standard is usually published as part of the network policy. Furthermore, the network facilitator should also provide a mechanism to provide the supported domains of a network. */ code: unknown; /** @description This object contains a url to a media file. */ MediaFile: { /** @description indicates the nature and format of the document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838 */ mimetype?: string; /** * Format: uri * @description The URL of the file */ url?: string; /** @description The digital signature of the file signed by the sender */ signature?: string; /** @description The signing algorithm used by the sender */ dsa?: string; }; /** @description Describes an image */ Image: { /** * Format: uri * @description URL to the image. This can be a data url or an remote url */ url?: string; /** * @description The size of the image. The network policy can define the default dimensions of each type * @enum {string} */ size_type?: "xs" | "sm" | "md" | "lg" | "xl" | "custom"; /** @description Width of the image in pixels */ width?: string; /** @description Height of the image in pixels */ height?: string; }; /** @description Physical description of something. */ Descriptor: { name?: string; code?: string; short_desc?: string; long_desc?: string; additional_desc?: { url?: string; /** @enum {string} */ content_type?: "text/plain" | "text/html" | "application/json"; }; media?: components["schemas"]["MediaFile"][]; images?: components["schemas"]["Image"][]; }; /** @description Describes a GPS coordinate */ Gps: string; /** @description Describes a postal address. */ Address: string; /** @description Describes a city */ City: { /** @description Name of the city */ name?: string; /** @description City code */ code?: string; }; /** @description A bounded geopolitical region of governance inside a country. */ State: { /** @description Name of the state */ name?: string; /** @description State code as per country or international standards */ code?: string; }; /** @description Describes a country */ Country: { /** @description Name of the country */ name?: string; /** @description Country code as per ISO 3166-1 and ISO 3166-2 format */ code?: string; }; /** @description Describes a numerical value in decimal form */ DecimalValue: string; /** @description Describes a scalar */ Scalar: { /** @enum {string} */ type?: "CONSTANT" | "VARIABLE"; value?: components["schemas"]["DecimalValue"]; estimated_value?: components["schemas"]["DecimalValue"]; computed_value?: components["schemas"]["DecimalValue"]; range?: { min?: components["schemas"]["DecimalValue"]; max?: components["schemas"]["DecimalValue"]; }; unit?: string; }; /** @description Describes a circular region of a specified radius centered at a specified GPS coordinate. */ Circle: { gps?: components["schemas"]["Gps"]; radius?: components["schemas"]["Scalar"]; }; /** @description Rating value given to the object. This can be a single value or can also contain an inequality operator like gt, gte, lt, lte. This can also contain an inequality expression containing logical operators like && and ||. */ value: string; /** @description The physical location of something */ Location: { id?: string; descriptor?: components["schemas"]["Descriptor"]; /** * Format: uri * @description The url to the map of the location. This can be a globally recognized map url or the one specified by the network policy. */ map_url?: string; /** @description The GPS co-ordinates of this location. */ gps?: components["schemas"]["Gps"]; /** @description The address of this location. */ address?: components["schemas"]["Address"]; /** @description The city this location is, or is located within */ city?: components["schemas"]["City"]; /** @description The state this location is, or is located within */ district?: string; /** @description The state this location is, or is located within */ state?: components["schemas"]["State"]; /** @description The country this location is, or is located within */ country?: components["schemas"]["Country"]; area_code?: string; circle?: components["schemas"]["Circle"]; /** @description The boundary polygon of this location */ polygon?: string; /** @description The three dimensional region describing this location */ "3dspace"?: string; /** @description The rating of this location */ rating?: components["schemas"]["value"]; }; /** @description A globally unique identifier of the platform, Typically it is the fully qualified domain name (FQDN) of the platform. */ subscriber_id: string; /** * Format: uri * @description The callback URL of the Subscriber. This should necessarily contain the same domain name as set in `subscriber_id``. */ url: string; /** @description Every API call in beckn protocol has a context. It provides a high-level overview to the receiver about the nature of the intended transaction. Typically, it is the BAP that sets the transaction context based on the consumer's location and action on their UI. But sometimes, during unsolicited callbacks, the BPP also sets the transaction context but it is usually the same as the context of a previous full-cycle, request-callback interaction between the BAP and the BPP. The context object contains four types of fields. <ol><li>Demographic information about the transaction using fields like `domain`, `country`, and `region`.</li><li>Addressing details like the sending and receiving platform's ID and API URL.</li><li>Interoperability information like the protocol version that implemented by the sender and,</li><li>Transaction details like the method being called at the receiver's endpoint, the transaction_id that represents an end-to-end user session at the BAP, a message ID to pair requests with callbacks, a timestamp to capture sending times, a ttl to specifiy the validity of the request, and a key to encrypt information if necessary.</li></ol> This object must be passed in every interaction between a BAP and a BPP. In HTTP/S implementations, it is not necessary to send the context during the synchronous response. However, in asynchronous protocols, the context must be sent during all interactions, */ Context: { /** @description Domain code that is relevant to this transaction context */ domain?: components["schemas"]["code"]; /** @description The location where the transaction is intended to be fulfilled. */ location?: components["schemas"]["Location"]; /** @description The Beckn protocol method being called by the sender and executed at the receiver. */ action?: string; /** @description Version of transaction protocol being used by the sender. */ version?: string; /** @description Subscriber ID of the BAP */ bap_id?: components["schemas"]["subscriber_id"]; /** @description Subscriber URL of the BAP for accepting callbacks from BPPs. */ bap_uri?: components["schemas"]["url"]; /** @description Subscriber ID of the BPP */ bpp_id?: components["schemas"]["subscriber_id"]; /** @description Subscriber URL of the BPP for accepting calls from BAPs. */ bpp_uri?: components["schemas"]["url"]; /** * Format: uuid * @description This is a unique value which persists across all API calls from `search` through `confirm`. This is done to indicate an active user session across multiple requests. The BPPs can use this value to push personalized recommendations, and dynamic offerings related to an ongoing transaction despite being unaware of the user active on the BAP. */ transaction_id?: string; /** * Format: uuid * @description This is a unique value which persists during a request / callback cycle. Since beckn protocol APIs are asynchronous, BAPs need a common value to match an incoming callback from a BPP to an earlier call. This value can also be used to ignore duplicate messages coming from the BPP. It is recommended to generate a fresh message_id for every new interaction. When sending unsolicited callbacks, BPPs must generate a new message_id. */ message_id?: string; /** * Format: date-time * @description Time of request generation in RFC3339 format */ timestamp?: string; /** @description The encryption public key of the sender */ key?: string; /** @description The duration in ISO8601 format after timestamp for which this message holds valid */ ttl?: string; }; /** @description Describes duration as per ISO8601 format */ Duration: string; /** @description Describes schedule as a repeating time period used to describe a regularly recurring event. At a minimum a schedule will specify frequency which describes the interval between occurrences of the event. Additional information can be provided to specify the schedule more precisely. This includes identifying the timestamps(s) of when the event will take place. Schedules may also have holidays to exclude a specific day from the schedule.<br>This has properties like frequency, holidays, times */ Schedule: { frequency?: components["schemas"]["Duration"]; holidays?: string[]; times?: string[]; }; /** @description Describes time in its various forms. It can be a single point in time; duration; or a structured timetable of operations<br>This has properties like label, time stamp,duration,range, days, schedule */ Time: { label?: string; /** Format: date-time */ timestamp?: string; duration?: components["schemas"]["Duration"]; range?: { /** Format: date-time */ start?: string; /** Format: date-time */ end?: string; }; /** @description comma separated values representing days of the week */ days?: string; schedule?: components["schemas"]["Schedule"]; }; /** @description ID of the category */ id: string; /** @description Describes a tag. This is used to contain extended metadata. This object can be added as a property to any schema to describe extended attributes. For BAPs, tags can be sent during search to optimize and filter search results. BPPs can use tags to index their catalog to allow better search functionality. Tags are sent by the BPP as part of the catalog response in the `on_search` callback. Tags are also meant for display purposes. Upon receiving a tag, BAPs are meant to render them as name-value pairs. This is particularly useful when rendering tabular information about a product or service. */ Tag: { /** @description Description of the Tag, can be used to store detailed information. */ descriptor?: components["schemas"]["Descriptor"]; /** @description The value of the tag. This set by the BPP and rendered as-is by the BAP. */ value?: string; /** @description This value indicates if the tag is intended for display purposes. If set to `true`, then this tag must be displayed. If it is set to `false`, it should not be displayed. This value can override the group display value. */ display?: boolean; }; /** @description A collection of tag objects with group level attributes. For detailed documentation on the Tags and Tag Groups schema go to https://github.com/beckn/protocol-specifications/discussions/316 */ TagGroup: { /** * @description Indicates the display properties of the tag group. If display is set to false, then the group will not be displayed. If it is set to true, it should be displayed. However, group-level display properties can be overriden by individual tag-level display property. As this schema is purely for catalog display purposes, it is not recommended to send this value during search. * @default true */ display: boolean; /** @description Description of the TagGroup, can be used to store detailed information. */ descriptor?: components["schemas"]["Descriptor"]; /** @description An array of Tag objects listed under this group. This property can be set by BAPs during search to narrow the `search` and achieve more relevant results. When received during `on_search`, BAPs must render this list under the heading described by the `name` property of this schema. */ list?: components["schemas"]["Tag"][]; }; /** @description A label under which a collection of items can be grouped. */ Category: { /** @description ID of the category */ id?: string; parent_category_id?: components["schemas"]["id"]; descriptor?: components["schemas"]["Descriptor"]; time?: components["schemas"]["Time"]; /** @description Time to live for an instance of this schema */ ttl?: unknown; tags?: components["schemas"]["TagGroup"][]; }; /** @description Describes the state of fulfillment */ FulfillmentState: { descriptor?: components["schemas"]["Descriptor"]; /** Format: date-time */ updated_at?: string; /** @description ID of entity which changed the state */ updated_by?: string; }; /** @description Describes a credential of an entity - Person or Organization */ Credential: { id?: string; /** @default VerifiableCredential */ type: string; /** * Format: uri * @description URL of the credential */ url?: string; }; /** @description Describes a language known to the person. */ Language: { code?: string; name?: string; }; /** @description Describes a skill of the person. */ Skill: { code?: string; name?: string; }; /** @description Describes a person as any individual */ Person: { /** @description Describes the identity of the person */ id?: string; /** * Format: uri * @description Profile url of the person */ url?: string; /** @description the name of the person */ name?: string; image?: components["schemas"]["Image"]; /** @description Age of the person */ age?: components["schemas"]["Duration"]; /** * Format: date * @description Date of birth of the person */ dob?: string; /** @description Gender of something, typically a Person, but possibly also fictional characters, animals, etc. While Male and Female may be used, text strings are also acceptable for people who do not identify as a binary gender.Allowed values for this field can be published in the network policy */ gender?: string; creds?: components["schemas"]["Credential"][]; languages?: components["schemas"]["Language"][]; skills?: components["schemas"]["Skill"][]; tags?: components["schemas"]["TagGroup"][]; }; /** @description Describes the contact information of an entity */ Contact: { phone?: string; email?: string; /** @description A Jcard object as per draft-ietf-jcardcal-jcard-03 specification */ jcard?: Record<string, never>; }; /** @description Describes a customer buying/availing a product or a service */ Customer: { person?: components["schemas"]["Person"]; contact?: components["schemas"]["Contact"]; }; /** @description An organization. Usually a recognized business entity. */ Organization: { descriptor?: components["schemas"]["Descriptor"]; /** @description The postal address of the organization */ address?: components["schemas"]["Address"]; /** @description The state where the organization's address is registered */ state?: components["schemas"]["State"]; /** @description The city where the the organization's address is registered */ city?: components["schemas"]["City"]; contact?: components["schemas"]["Contact"]; }; /** @description Describes the direct performer, driver or executor that fulfills an order. It is usually a person. But in some rare cases, it could be a non-living entity like a drone, or a bot. Some examples of agents are Doctor in the healthcare sector, a driver in the mobility sector, or a delivery person in the logistics sector. This object can be set at any stage of the order lifecycle. This can be set at the discovery stage when the BPP wants to provide details on the agent fulfilling the order, like in healthcare, where the doctor's name appears during search. This object can also used to search for a particular person that the customer wants fulfilling an order. Sometimes, this object gets instantiated after the order is confirmed, like in the case of on-demand taxis, where the driver is assigned after the user confirms the ride. */ Agent: { person?: components["schemas"]["Person"]; contact?: components["schemas"]["Contact"]; organization?: components["schemas"]["Organization"]; rating?: components["schemas"]["value"]; }; /** @description Describes a vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.<br>This has properties like category, capacity, make, model, size,variant,color,energy_type,registration */ Vehicle: { category?: string; capacity?: number; make?: string; model?: string; size?: string; variant?: string; color?: string; energy_type?: string; registration?: string; wheels_count?: string; cargo_volumne?: string; wheelchair_access?: string; code?: string; emission_standard?: string; }; /** @description Describes an authorization mechanism used to start or end the fulfillment of an order. For example, in the mobility sector, the driver may require a one-time password to initiate the ride. In the healthcare sector, a patient may need to provide a password to open a video conference link during a teleconsultation. */ Authorization: { /** @description Type of authorization mechanism used. The allowed values for this field can be published as part of the network policy. */ type?: string; /** @description Token used for authorization. This is typically generated at the BPP. The BAP can send this value to the user via any channel that it uses to authenticate the user like SMS, Email, Push notification, or in-app rendering. */ token?: string; /** * Format: date-time * @description Timestamp in RFC3339 format from which token is valid */ valid_from?: string; /** * Format: date-time * @description Timestamp in RFC3339 format until which token is valid */ valid_to?: string; /** @description Status of the token */ status?: string; }; /** @description A logical point in space and time during the fulfillment of an order. */ Stop: { id?: string; parent_stop_id?: string; /** @description Location of the stop */ location?: components["schemas"]["Location"]; /** @description The type of stop. Allowed values of this property can be defined by the network policy. */ type?: string; /** @description Timings applicable at the stop. */ time?: components["schemas"]["Time"]; /** @description Instructions that need to be followed at the stop */ instructions?: components["schemas"]["Descriptor"]; /** @description Contact details of the stop */ contact?: components["schemas"]["Contact"]; /** @description The details of the person present at the stop */ person?: components["schemas"]["Person"]; authorization?: components["schemas"]["Authorization"]; }; /** @description Describes how a an order will be rendered/fulfilled to the end-customer */ Fulfillment: { /** @description Unique reference ID to the fulfillment of an order */ id?: string; /** @description A code that describes the mode of fulfillment. This is typically set when there are multiple ways an order can be fulfilled. For example, a retail order can be fulfilled either via store pickup or a home delivery. Similarly, a medical consultation can be provided either in-person or via tele-consultation. The network policy must publish standard fulfillment type codes for the different modes of fulfillment. */ type?: string; /** @description Whether the fulfillment can be rated or not */ rateable?: boolean; /** @description The rating value of the fulfullment service. */ rating?: components["schemas"]["value"]; /** @description The current state of fulfillment. The BPP must set this value whenever the state of the order fulfillment changes and fire an unsolicited `on_status` call. */ state?: components["schemas"]["FulfillmentState"]; /** * @description Indicates whether the fulfillment allows tracking * @default false */ tracking: boolean; /** @description The person that will ultimately receive the order */ customer?: components["schemas"]["Customer"]; /** @description The agent that is currently handling the fulfillment of the order */ agent?: components["schemas"]["Agent"]; contact?: components["schemas"]["Contact"]; vehicle?: components["schemas"]["Vehicle"]; /** @description The list of logical stops encountered during the fulfillment of an order. */ stops?: components["schemas"]["Stop"][]; /** @description The physical path taken by the agent that can be rendered on a map. The allowed format of this property can be set by the network. */ path?: string; tags?: components["schemas"]["TagGroup"][]; }; /** @description Describes the terms of settlement between the BAP and the BPP for a single transaction. When instantiated, this object contains <ol><li>the amount that has to be settled,</li><li>The payment destination destination details</li><li>When the settlement should happen, and</li><li>A transaction reference ID</li></ol>. During a transaction, the BPP reserves the right to decide the terms of payment. However, the BAP can send its terms to the BPP first. If the BPP does not agree to those terms, it must overwrite the terms and return them to the BAP. If overridden, the BAP must either agree to the terms sent by the BPP in order to preserve the provider's autonomy, or abort the transaction. In case of such disagreements, the BAP and the BPP can perform offline negotiations on the payment terms. Once an agreement is reached, the BAP and BPP can resume transactions. */ Payment: { /** @description ID of the payment term that can be referred at an item or an order level in a catalog */ id?: string; /** @description This field indicates who is the collector of payment. The BAP can set this value to 'bap' if it wants to collect the payment first and settle it to the BPP. If the BPP agrees to those terms, the BPP should not send the payment url. Alternatively, the BPP can set this field with the value 'bpp' if it wants the payment to be made directly. */ collected_by?: unknown; /** * Format: uri * @description A payment url to be called by the BAP. If empty, then the payment is to be done offline. The details of payment should be present in the params object. If tl_method = http/get, then the payment details will be sent as url params. Two url param values, ```$transaction_id``` and ```$amount``` are mandatory. */ url?: string; params?: { /** @description The reference transaction ID associated with a payment activity */ transaction_id?: string; amount?: string; currency?: string; bank_code?: string; bank_account_number?: string; virtual_payment_address?: string; source_bank_code?: string; source_bank_account_number?: string; source_virtual_payment_address?: string; }; /** @enum {string} */ type?: "PRE-ORDER" | "PRE-FULFILLMENT" | "ON-FULFILLMENT" | "POST-FULFILLMENT"; /** @enum {string} */ status?: "PAID" | "NOT-PAID"; time?: components["schemas"]["Time"]; tags?: components["schemas"]["TagGroup"][]; }; "properties-id": string; /** @description ID of the item. */ "Item_properties-id": string; /** @description An offer associated with a catalog. This is typically used to promote a particular product and enable more purchases. */ Offer: { id?: string; descriptor?: components["schemas"]["Descriptor"]; location_ids?: components["schemas"]["properties-id"][]; category_ids?: components["schemas"]["id"][]; item_ids?: components["schemas"]["Item_properties-id"][]; time?: components["schemas"]["Time"]; tags?: components["schemas"]["TagGroup"][]; }; /** @description Describes the count or amount of an item */ ItemQuantity: { /** @description This represents the exact quantity allocated for purchase of the item. */ allocated?: { count?: number; measure?: components["schemas"]["Scalar"]; }; /** @description This represents the exact quantity available for purchase of the item. The buyer can only purchase multiples of this */ available?: { count?: number; measure?: components["schemas"]["Scalar"]; }; /** @description This represents the maximum quantity allowed for purchase of the item */ maximum?: { count?: number; measure?: components["schemas"]["Scalar"]; }; /** @description This represents the minimum quantity allowed for purchase of the item */ minimum?: { count?: number; measure?: components["schemas"]["Scalar"]; }; /** @description This represents the quantity selected for purchase of the item */ selected?: { count?: number; measure?: components["schemas"]["Scalar"]; }; /** @description This represents the quantity available in a single unit of the item */ unitized?: { count?: number; measure?: components["schemas"]["Scalar"]; }; }; /** @description Describes the price of a product or service */ Price: { currency?: string; value?: components["schemas"]["DecimalValue"]; estimated_value?: components["schemas"]["DecimalValue"]; computed_value?: components["schemas"]["DecimalValue"]; listed_value?: components["schemas"]["DecimalValue"]; offered_value?: components["schemas"]["DecimalValue"]; minimum_value?: components["schemas"]["DecimalValue"]; maximum_value?: components["schemas"]["DecimalValue"]; }; /** @description Unique reference ID to the fulfillment of an order */ "Fulfillment_properties-id": string; /** @description ID of the payment term that can be referred at an item or an order level in a catalog */ "Payment_properties-id": string; /** @description Describes an additional item offered as a value-addition to a product or service. This does not exist independently in a catalog and is always associated with an item. */ AddOn: { /** @description Provider-defined ID of the add-on */ id?: string; descriptor?: components["schemas"]["Descriptor"]; price?: components["schemas"]["Price"]; }; /** @description A fee applied on a particular entity */ Fee: { /** @description Percentage of a value */ percentage?: components["schemas"]["DecimalValue"]; /** @description A fixed value */ amount?: components["schemas"]["Price"]; }; /** @description Describes a form */ Form: { /** * Format: uri * @description The URL from where the form can be fetched. The content fetched from the url must be processed as per the mime_type specified in this object. Once fetched, the rendering platform can choosed to render the form as-is as an embeddable element; or process it further to blend with the theme of the application. In case the interface is non-visual, the the render can process the form data and reproduce it as per the standard specified in the form. */ url?: string; /** @description The form submission data */ data?: { [key: string]: string; }; /** * @description This field indicates the nature and format of the form received by querying the url. MIME types are defined and standardized in IETF's RFC 6838. * @enum {string} */ mime_type?: "text/html" | "application/xml"; /** Format: uuid */ submission_id?: string; }; /** @description Contains any additional or extended inputs required to confirm an order. This is typically a Form Input. Sometimes, selection of catalog elements is not enough for the BPP to confirm an order. For example, to confirm a flight ticket, the airline requires details of the passengers along with information on baggage, identity, in addition to the class of ticket. Similarly, a logistics company may require details on