diff --git a/demo/openapi.yaml b/demo/openapi.yaml
index 0adb6933..790a76c7 100644
--- a/demo/openapi.yaml
+++ b/demo/openapi.yaml
@@ -40,7 +40,7 @@ info:
- version: 1.0.0
+ version: 1.1.0
title: Swagger Petstore
termsOfService: 'http://swagger.io/terms/'
contact:
@@ -59,6 +59,8 @@ externalDocs:
tags:
- name: pet
description: Everything about your Pets
+ - name: Tn Option
+ description: Everything about your TN Options
- name: store
description: Access to Petstore orders
- name: user
@@ -76,6 +78,7 @@ x-tagGroups:
tags:
- pet
- store
+ - Tn Option
- name: User Management
tags:
- user
@@ -179,6 +182,588 @@ paths:
}
requestBody:
$ref: '#/components/requestBodies/Pet'
+ '/accounts/{accountId}/tnoptions/{orderid}/history':
+ get:
+ description: Retrieve the history information associated with an order.
+ operationId: GetOrderHistory
+ parameters:
+ - description: ''
+ in: path
+ name: orderid
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/xml:
+ examples:
+ application/xml:
+ value: |-
+
+
+
+ 2020-09-17T08:56:39.607Z
+ Order has been received by the system.
+ admin
+ received
+
+
+ 2020-09-17T08:56:39.743Z
+ Order processing has started.
+ admin
+ processing
+
+
+ 2020-09-17T08:56:39.820Z
+ Order is complete.
+ admin
+ complete
+
+
+ description: >-
+ The history payload is a set of history records, each of which
+ contains:
+
+
+ OrderDate |
+ The date that the order history event happened |
Status | The new state of the TN Option order - RECEIVED, PROCESSING, COMPLETE, PARTIAL, FAILED |
Note | A Note or additional information included with the state change |
Author | The user id that implemented the state change |
+ '404':
+ content:
+ application/xml: {}
+ description: Not found. The order id does not exist in the system.
+ summary: Retrieve TN Option order history
+ tags:
+ - Tn Option
+ '/accounts/{accountId}/tnoptions':
+ get:
+ description: >-
+ Retrieve a list of the TN Option orders that are associated with the
+ account. A maximum of 1,000 orders can be retrieved per request. If no
+ date range or specific query parameter (marked by * below) is
+ provided, the order results will be limited to the last two years.
+ operationId: GetTnOptionOrders
+ parameters:
+ - description: The status of the TN Option order being searched for.
+ example: PROCESSING
+ in: query
+ name: status
+ required: false
+ schema:
+ items:
+ type: string
+ type: array
+ - description: * A Telephone Number (TN) that is referenced in the order.
+ example: '9199918388'
+ in: query
+ name: tn
+ required: false
+ schema:
+ type: string
+ - description: >-
+ * The Customer Order ID is an ID assigned by the account
+ owner to provide a reference number for the TN Option order.
+ example: ABCCorp12345
+ in: query
+ name: customerOrderId
+ required: false
+ schema:
+ type: string
+ - description: >-
+ For Date-based searches, the starting date of a date range
+ (inclusive) that will be used to find TN Option Orders that were
+ modified within the date range. It is in the form yyyy-MM-dd.
+ example: '2013-10-22'
+ in: query
+ name: modifiedDateFrom
+ required: false
+ schema:
+ type: string
+ - description: >-
+ For Date-based searches, the ending date of a date range (inclusive)
+ that will be used to find TN Option Orders that were modified within
+ the date range. It is in the form yyyy-MM-dd.
+ example: '2013-10-25'
+ in: query
+ name: modifiedDateTo
+ required: false
+ schema:
+ type: string
+ - description: >-
+ Checks the order's creation date against this value. Orders that
+ have a creation date after this date will be included. Format is
+ yyyy-MM-dd.
+ example: '2013-10-22'
+ in: query
+ name: createdDateFrom
+ required: false
+ schema:
+ type: string
+ - description: >-
+ Checks the order's creation date against this value. Orders that
+ have a creation date before this date will be included. Format is
+ yyyy-MM-dd.
+ example: '2013-10-25'
+ in: query
+ name: createdDateTo
+ required: false
+ schema:
+ type: string
+ - description: >-
+ Checks the order's last modified date against this value. Orders
+ that have a modification date after this date will be included.
+ Format is yyyy-MM-dd.
+ example: '2013-10-25'
+ in: query
+ name: lastModifiedAfter
+ required: false
+ schema:
+ type: string
+ - description: >-
+ This is the user-name of the user that last modified the TN Option
+ Order.
+ example: smckinnon
+ in: query
+ name: lastModifiedBy
+ required: false
+ schema:
+ type: string
+ - description: >-
+ * This search parameter represents the internal Bandwidth
+ Dashboard API ID that has been assigned to the TN Option Order. This
+ parameter is the first few characters of the internal ID - the
+ entire ID does not need to be specified.
+ example: ed1c0bed-e2
+ in: query
+ name: orderIdFragment
+ required: false
+ schema:
+ type: string
+ - description: >-
+ If set to true, a list of order details will be displayed instead
+ the summary information.
+ in: query
+ name: orderDetails
+ required: false
+ schema:
+ type: boolean
+ responses:
+ '200':
+ content:
+ application/xml:
+ examples:
+ example:
+ value: |-
+
+
+
+ 2
+
+ 14
+ 2
+ jbm
+ 2016-01-15T12:01:14.363Z
+ 2016-01-15T12:01:14.324Z
+ tn_option
+ FAILED
+ ddbdc72e-dc27-490c-904e-d0c11291b095
+
+
+ 14
+ 3
+ jbm
+ 2016-01-15T11:22:58.969Z
+ 2016-01-15T11:22:58.789Z
+ tn_option
+ COMPLETE
+ 409033ee-88ec-43e3-85f3-538f30733963
+
+
+
+
+ 2
+
+ 2016-01-15T12:01:14.324Z
+ 14
+ jbm
+ ddbdc72e-dc27-490c-904e-d0c11291b095
+ 2016-01-15T12:01:14.363Z
+ FAILED
+
+
+ 10digit
+ 10digit
+ testUser1
+ 6042661720
+ on
+ true
+ on
+ sip:+12345678901@1.2.3.4:5060
+
+ 2018551020
+
+
+
+ off
+ false
+ off
+
+ 2018551025
+
+
+
+
+
+ 5076
+ Telephone number is not available.
+ 2018551025
+
+
+ 5076
+ Telephone number is not available.
+ 2018551020
+
+
+
+
+ 2016-01-15T11:22:58.789Z
+ 14
+ jbm
+ 409033ee-88ec-43e3-85f3-538f30733963
+ 2016-01-15T11:22:58.969Z
+ COMPLETE
+
+
+ on
+
+ 2174101601
+
+
+
+ off
+
+ 2174101602
+
+
+
+ systemdefault
+
+ 2174101603
+
+
+
+
+
+
+
+ description: >-
+ The descriptive payload for the TN Option Orders query provides a
+ broad range of information about the TN Option Orders found by the
+ query, including the data associated with the order, the state of
+ the order, and details about the order if it was successful.
+ '404':
+ content:
+ application/xml: {}
+ description: >
+ Not Found. If any errors are found in the processing of the query
+ string a 404 will be returned. Note that parameters that are not
+ recognized are not considered errors, and are just ignored.
+ summary: Retrieve list TN Option orders
+ tags:
+ - Tn Option
+ post:
+ description: >-
+ Create TN Option order to assign line features to the telephone
+ number.
Attribute description:- for A2pSettings
+ attribute
Number
+ attribute | Action value | Description of
+ action |
---|
LongCode | systemDefault | Removes
+ the per-TN A2P attributes, and it reverts to the Location/SIP Peer
+ characteristics. Any values for Class or Campaign ID are not
+ valid |
LongCode | asSpecified | Sets
+ the message class and campaign ID - this is the default if
+ unspecified |
LongCode | off | Will
+ set the TN as a 'P' TN. Any values for Class or Campaign ID are not
+ valid |
LongCode | delete | Will
+ delete the campaign ID from TN. Any values for Class or Campaign ID are
+ not valid |
LongCode | unchanged | Do
+ nothing with respect to
+ A2P |
TollFree | systemDefault | Removes
+ the per-TN A2P attributes, and it reverts to the Location/SIP Peer
+ characteristics. Any values for Class or Campaign ID are not
+ valid |
TollFree | asSpecified | Sets
+ the message class and campaign ID - this is the default if
+ unspecified |
TollFree | off | If the
+ Togglz value is set to 'on' this is invalid for Toll Free telephone
+ numbers. Any values for Class or Campaign ID in the payload are invalid.
+ If the Togglz value is set to off this behaves like and A2P TN, where
+ the characteristics of the TNs is set to
+ 'P' |
TollFree | unchanged | Do
+ nothing with respect to A2P |
- for Origination
+ Route plan attribute
Action
+ value | Description of
+ action |
---|
asSpecified | Creates/updates the
+ origination route plan for the TN with route plan details provided in
+ the request |
off | Removes the origination route
+ plan for the TN. Route list is the request must be
+ empty |
unchanged | Doesn't update/create the
+ origination route plan, even when route plan details exist in the
+ request |
- Origination route plan is
+ validated against CallForward and RewriteUser
- Route plan and CallForward cannot co-exist. Order is
+ accepted but will respond with error messages on GET.
- Route plan and RewriteUser cannot co-exist. Order is
+ accepted but will respond with error messages on
+ GET.
- for Pindrop Enabled attribute
Action value | Description of
+ action |
---|
true | Enables Pindrop integration on each
+ phone number in the option
+ group |
false | Explicitly disables Pindrop
+ integration on each phone number in the option
+ group |
- for other attribute
- systemDefault - implies that the element profile
+ value should be removed so that the TN changes back to the default
+ system behavior;
- unchanged - the value
+ should remain unchanged - implies a read before write model.
- Leaving the element out of the payload is equivalent to
+ unchanged.
+ operationId: CreateTnOptionOrder
+ requestBody:
+ content:
+ application/xml:
+ examples:
+ example:
+ value: |-
+
+
+ TnOptionOrder1
+
+
+ 10digit
+ 10digit
+ testUser1
+ 6042661720
+ on
+ a1b2c3
+ true
+ on
+ sip:+12345678901@1.2.3.4:5060
+
+ M
+ campaignId010
+ asSpecified
+
+
+ 2018551020
+
+
+
+ off
+ false
+ off
+
+
+ 6105552502
+ 1
+ 100
+
+
+ sip:clarkkent@dailyplanet.com
+ 2
+ 100
+
+
+ 192.168.20.21
+ 3
+ 50
+
+
+ 7075552509
+ 3
+ 50
+
+
+ myhost.bandwidth.example
+ 4
+ 100
+
+ asSpecified
+
+
+ 2018551025
+
+
+
+ true
+
+ 2018551026
+
+
+
+
+ responses:
+ '201':
+ content:
+ application/xml:
+ examples:
+ example:
+ value: |-
+
+
+
+ 2016-01-15T12:01:14.324Z
+ 14
+ jbm
+ ddbdc72e-dc27-490c-904e-d0c11291b095
+ 2016-01-15T12:01:14.324Z
+ RECEIVED
+
+
+ 10digit
+ 10digit
+ testUser1
+ 6042661720
+ on
+ true
+ on
+
+ 2018551020
+
+
+
+ off
+ false
+ off
+
+ 2018551025
+
+
+
+
+
+
+ description: Created
+ '400':
+ content:
+ application/xml:
+ examples:
+ example:
+ value: |-
+
+
+
+ 5081
+ Number Format 'wrong' is invalid.
+
+
+ description: >-
+ Bad Request A 400 response Indicates that the order could not be
+ created. Error text and an error code will be provided in the
+ ErrorList element.
+ '409':
+ content:
+ application/xml:
+ examples:
+ example:
+ value: |-
+
+
+
+ 5200
+ Origination route plan is not enabled for the account.
+
+
+ description: >-
+ Conflict. Error text and an error code will be provided in the
+ ErrorList element.
+ summary: Create TN Option order
+ tags:
+ - Tn Option
+ '/accounts/{accountId}/tnoptions/{orderid}':
+ get:
+ description: Retrieve information about a TN Option Order with specified ID.
+ operationId: GetTnOptionOrder
+ parameters:
+ - description: ''
+ in: path
+ name: orderid
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/xml:
+ examples:
+ example:
+ value: |-
+
+
+ 2016-01-15T11:22:58.789Z
+ 14
+ jbm
+ 409033ee-88ec-43e3-85f3-538f30733963
+ 2016-01-15T11:22:58.969Z
+ COMPLETE
+
+
+ on
+ on
+
+ 2174101601
+
+
+
+ off
+
+ 2174101602
+
+
+
+ systemdefault
+ sip:+12345678901@1.2.3.4:5060
+
+ 2174101603
+
+
+
+
+
+
+ 2174101601
+ SMS is already Enabled or number is in processing.
+
+
+
+ description: >-
+ The descriptive payload for the TN Option Orders query provides a
+ broad range of information about the TN Option Order identified in
+ the URL. Included amongst the information is: - ErrorList -
+ the errors discovered with codes and explanations
- Warnings -
+ the warnings discovered with
+ explanations
- ProcessingStatus(RECEIVED, PROCESSING,
+ COMPLETE, PARTIAL, FAILED) - the overall status of the
+ order
+ '404':
+ content:
+ application/xml:
+ examples:
+ example:
+ value: |-
+
+
+
+ The resource does not exist
+
+
+ description: Not found. The order id does not exist in the system.
+ summary: Retrieve TN Option order
+ tags:
+ - Tn Option
'/pet/{petId}':
get:
tags:
diff --git a/e2e/integration/search.e2e.ts b/e2e/integration/search.e2e.ts
index 35b30dbb..1ec69a93 100644
--- a/e2e/integration/search.e2e.ts
+++ b/e2e/integration/search.e2e.ts
@@ -16,9 +16,9 @@ describe('Search', () => {
getSearchInput().type('t', { force: true });
cy.get('[role=search] [role=menuitem]')
- .should('have.length', 3)
+ .should('have.length', 4)
.first()
- .should('contain', 'Introduction');
+ .should('contain', 'Delete purchase order');
getSearchInput().type('{esc}', { force: true });
getSearchResults().should('not.exist');
@@ -40,8 +40,8 @@ describe('Search', () => {
getResult(1).should('not.have.class', 'active');
getResult(0).should('have.class', 'active');
- getSearchInput().type('{uparrow}', { force: true });
- getResult(0).should('have.class', 'active');
+ getSearchInput().type('{downarrow}', { force: true });
+ getResult(1).should('have.class', 'active');
getSearchInput().type('{enter}', { force: true });
@@ -74,5 +74,8 @@ describe('Search', () => {
.should('have.length', 1)
.first()
.should('contain', 'uploads an image');
+
+ getSearchInput().clear().type('/tnoptions', { force: true, parseSpecialCharSequences: false });
+ cy.get('[role=search] [role=menuitem]').should('have.length', 5);
});
});
diff --git a/src/services/SearchStore.ts b/src/services/SearchStore.ts
index feb19c69..8be5821f 100644
--- a/src/services/SearchStore.ts
+++ b/src/services/SearchStore.ts
@@ -26,7 +26,11 @@ export class SearchStore {
const recurse = items => {
items.forEach(group => {
if (group.type !== 'group') {
- this.add(group.name, (group.description || '').concat(' ', group.path || ''), group.id);
+ this.add(
+ group.name,
+ (group.description || '').concat(' ', group.path?.concat('/0') || ''),
+ group.id,
+ );
}
recurse(group.items);
});