diff --git a/code/API_definitions/brand-registration.yaml b/code/API_definitions/brand-registration.yaml index b9d7e56..da3974d 100644 --- a/code/API_definitions/brand-registration.yaml +++ b/code/API_definitions/brand-registration.yaml @@ -18,6 +18,8 @@ info: * **phoneNumber** and **phoneNumberAlternate**: A pair of E.164 numbers representing the caller. Depending on the caller's networks access setup , only phoneNumber or both phoneNumber & phoneNumberAlternate may be used to uniquely identify the caller. The values typically correspond to parameters used in telecom signalling protocols, e.g. PAI and FROM headers in SIP. * **status**: Status of the registration. * **expiresAt**: The date in RFC 3339 / ISO 8601 compliant format when the brand registration is scheduled to expire. Registration status is moved to ``expired``. + * **createdAt**: Timestamp at which the Brand Registration has been created. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. + * **updatedAt**: Timestamp at which the Brand Registration has been last updated. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. * **displayName**: A human-readable string that is to be displayed to the callee on their device screen instead of the calling number. * **displayAsset**: A visual asset (e.g. a logo, image or video) that is to be displayed to the callee on their device screen instead of the calling number. Support of the visual asset depends on the service provider and callee's device. If the service provider does not support the parameter, it SHALL clearly document the limitation and SHOULD silently ignore the parameter if received. * **customerId** : A string to represent the owner of the displayName, e.g. a commercial brand or an institution. @@ -259,6 +261,10 @@ paths: - `customerId` - filter by enterprise/brand owner identifier. - `displayName` - filter by the display name registered for the brand. - `status` - filter by registration status. + - `createdAt.lte` - filter by lower createdAt date-time. + - `createdAt.gte` - filter by greater createdAt date-time. + - `updatedAt.lte` - filter by lower updatedAt date-time. + - `updatedAt.gte` - filter by greater updatedAt date-time. - `expiresAt` - filter by expiresAt date. - `terminatingCountryCode` - filter by terminating country code. - `callPurpose` - filter by call purpose. @@ -278,6 +284,10 @@ paths: - $ref: '#/components/parameters/CustomerIdFilter' - $ref: '#/components/parameters/DisplayNameFilter' - $ref: '#/components/parameters/StatusFilter' + - $ref: '#/components/parameters/CreatedAtBeforeFilter' + - $ref: '#/components/parameters/CreatedAtAfterFilter' + - $ref: '#/components/parameters/UpdatedAtBeforeFilter' + - $ref: '#/components/parameters/UpdatedAtAfterFilter' - $ref: '#/components/parameters/ExpiresAtFilter' - $ref: '#/components/parameters/TerminatingCountryCodeFilter' - $ref: '#/components/parameters/CallPurposeFilter' @@ -490,6 +500,34 @@ components: description: Optional filter. Restrict results to registrations in the given `status`. schema: $ref: '#/components/schemas/Status' + CreatedAtBeforeFilter: + name: createdAt.lte + in: query + required: false + description: Optional filter. Restrict results to registrations for which creation date-time is lower or equal than the given createdAt date-time. + schema: + $ref: '#/components/schemas/CreatedAt' + CreatedAtAfterFilter: + name: createdAt.gte + in: query + required: false + description: Optional filter. Restrict results to registrations for which creation date-time is greater or equal than the given createdAt date-time. + schema: + $ref: '#/components/schemas/CreatedAt' + UpdatedAtBeforeFilter: + name: updatedAt.lte + in: query + required: false + description: Optional filter. Restrict results to registrations for which last update date-time is lower or equal than the given updatedAt date-time. + schema: + $ref: '#/components/schemas/UpdatedAt' + UpdatedAtAfterFilter: + name: updatedAt.gte + in: query + required: false + description: Optional filter. Restrict results to registrations for which last update date-time is greater or equal than the given updatedAt date-time. + schema: + $ref: '#/components/schemas/UpdatedAt' ExpiresAtFilter: name: expiresAt in: query @@ -555,6 +593,20 @@ components: example: "2023-07-03" maxLength: 10 + CreatedAt: + type: string + format: date-time + maxLength: 64 + description: Timestamp at which the Brand Registration has been created. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. + example: "2018-04-05T17:31:00Z" + + UpdatedAt: + type: string + format: date-time + maxLength: 64 + description: Timestamp at which the Brand Registration has been last updated. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. + example: "2018-04-05T17:31:00Z" + CustomerId: type: string maxLength: 64 @@ -690,6 +742,10 @@ components: $ref: '#/components/schemas/PhoneNumber' status: $ref: '#/components/schemas/Status' + createdAt: + $ref: '#/components/schemas/CreatedAt' + updatedAt: + $ref: '#/components/schemas/UpdatedAt' expiresAt: $ref: '#/components/schemas/ExpiresAt' displayName: @@ -735,29 +791,6 @@ components: pagination: $ref: "../common/CAMARA_common.yaml#/components/schemas/Pagination" - ErrorInfo: - description: Common schema for errors - type: object - required: - - status - - code - - message - properties: - status: - type: integer - format: int32 - minimum: 100 - maximum: 599 - description: HTTP status code returned along with this error response - code: - type: string - description: Code given to this error - maxLength: 96 - message: - type: string - description: Detailed error description - maxLength: 512 - BrandRegistrationEventType: type: string description: | @@ -1116,7 +1149,7 @@ components: application/json: schema: allOf: - - $ref: "#/components/schemas/ErrorInfo" + - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" - type: object properties: status: @@ -1175,7 +1208,7 @@ components: application/json: schema: allOf: - - $ref: "#/components/schemas/ErrorInfo" + - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" - type: object properties: status: @@ -1209,7 +1242,7 @@ components: application/json: schema: allOf: - - $ref: "#/components/schemas/ErrorInfo" + - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" - type: object properties: status: @@ -1251,7 +1284,7 @@ components: application/json: schema: allOf: - - $ref: "#/components/schemas/ErrorInfo" + - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" - type: object properties: status: