Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Address Suggestions Client #84

Merged
merged 3 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clients/address-suggestions-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions clients/address-suggestions-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epilot/address-suggestions-client",
"version": "0.0.2",
"version": "0.0.5",
"description": "Client for epilot Address Suggestions API",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -21,7 +21,7 @@
"scripts": {
"test": "jest",
"bundle-definition": "webpack",
"openapi": "node ../../scripts/update-openapi.js http://localhost:3001/openapi.json",
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/address-suggestions-api.yaml",
"typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ./src/openapi.json >> src/openapi.d.ts",
"build": "tsc && npm run bundle-definition",
"build:watch": "npm run build && tsc -w",
Expand Down
10 changes: 5 additions & 5 deletions clients/address-suggestions-client/src/openapi-runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
"name": "s3FileUrl",
"required": true
},
{
"in": "query",
"name": "countryCodeSearchTerm",
"required": false
},
{
"in": "query",
"name": "postalCodeSearchTerm",
Expand All @@ -41,11 +46,6 @@
"get": {
"operationId": "validateAddresses",
"parameters": [
{
"in": "header",
"name": "X-Epilot-Org-ID",
"required": true
},
{
"in": "query",
"name": "s3FileUrl",
Expand Down
10 changes: 4 additions & 6 deletions clients/address-suggestions-client/src/openapi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ declare namespace Paths {
"X-Epilot-Org-ID": Parameters.XEpilotOrgID;
}
namespace Parameters {
export type CountryCodeSearchTerm = string;
export type PostalCodeSearchTerm = string;
export type S3FileUrl = string;
export type StreetSearchTerm = string;
export type XEpilotOrgID = string;
}
export interface QueryParameters {
s3FileUrl: Parameters.S3FileUrl;
countryCodeSearchTerm?: Parameters.CountryCodeSearchTerm;
postalCodeSearchTerm?: Parameters.PostalCodeSearchTerm;
streetSearchTerm?: Parameters.StreetSearchTerm;
}
Expand All @@ -110,12 +112,8 @@ declare namespace Paths {
}
}
namespace ValidateAddresses {
export interface HeaderParameters {
"X-Epilot-Org-ID": Parameters.XEpilotOrgID;
}
namespace Parameters {
export type S3FileUrl = string;
export type XEpilotOrgID = string;
}
export interface QueryParameters {
s3FileUrl: Parameters.S3FileUrl;
Expand Down Expand Up @@ -144,7 +142,7 @@ export interface OperationMethods {
* Validates an addresses file, it returns an array of errors if the file is invalid
*/
'validateAddresses'(
parameters?: Parameters<Paths.ValidateAddresses.QueryParameters & Paths.ValidateAddresses.HeaderParameters> | null,
parameters?: Parameters<Paths.ValidateAddresses.QueryParameters> | null,
data?: any,
config?: AxiosRequestConfig
): OperationResponse<Paths.ValidateAddresses.Responses.$200>
Expand All @@ -170,7 +168,7 @@ export interface PathsDictionary {
* Validates an addresses file, it returns an array of errors if the file is invalid
*/
'get'(
parameters?: Parameters<Paths.ValidateAddresses.QueryParameters & Paths.ValidateAddresses.HeaderParameters> | null,
parameters?: Parameters<Paths.ValidateAddresses.QueryParameters> | null,
data?: any,
config?: AxiosRequestConfig
): OperationResponse<Paths.ValidateAddresses.Responses.$200>
Expand Down
58 changes: 39 additions & 19 deletions clients/address-suggestions-client/src/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
}
],
"servers": [
{
"url": "https://address-suggestions-api.sls.epilot.io"
},
{
"url": "https://address-suggestions-api.sls.epilot.io"
},
{
"url": "https://address-suggestions-api.sls.epilot.io"
}
Expand All @@ -32,7 +38,8 @@
"schema": {
"type": "string"
},
"required": true
"required": true,
"example": 739224
},
{
"in": "query",
Expand All @@ -41,7 +48,18 @@
"schema": {
"type": "string"
},
"description": "file s3 reference"
"description": "file s3 reference",
"example": "https://epilot-dev-user-content.s3.eu-central-1.amazonaws.com/739224/0a3639af-d4c3-4f96-bfc1-9dcbafdfaa42/availability-file-template%2520(13).csv"
},
{
"in": "query",
"name": "countryCodeSearchTerm",
"required": false,
"schema": {
"type": "string"
},
"description": "country code search term",
"example": "de"
},
{
"in": "query",
Expand All @@ -50,7 +68,8 @@
"schema": {
"type": "string"
},
"description": "postal code search term"
"description": "postal code search term",
"example": 506
},
{
"in": "query",
Expand All @@ -59,12 +78,14 @@
"schema": {
"type": "string"
},
"description": "postal code search term"
"description": "street search term"
}
],
"operationId": "getAddresses",
"summary": "get addresses from file",
"tags": ["Addresses API"],
"tags": [
"Addresses API"
],
"security": [],
"responses": {
"200": {
Expand Down Expand Up @@ -100,18 +121,10 @@
"description": "Validates an addresses file, it returns an array of errors if the file is invalid",
"operationId": "validateAddresses",
"summary": "validate addresses file",
"tags": ["Addresses API"],
"tags": [
"Addresses API"
],
"parameters": [
{
"in": "header",
"name": "X-Epilot-Org-ID",
"description": "The target Organization Id represented by the caller",
"schema": {
"type": "string"
},
"required": true,
"example": 739224
},
{
"in": "query",
"name": "s3FileUrl",
Expand Down Expand Up @@ -186,7 +199,9 @@
},
"schemas": {
"Error": {
"required": ["message"],
"required": [
"message"
],
"properties": {
"message": {
"type": "string",
Expand Down Expand Up @@ -242,7 +257,10 @@
"status": {
"description": "The status of the validation",
"type": "string",
"enum": ["success", "error"]
"enum": [
"success",
"error"
]
},
"rules_parsed_count": {
"description": "The number of rules successfully parsed",
Expand Down Expand Up @@ -274,7 +292,9 @@
"type": "string"
}
},
"required": ["msg"]
"required": [
"msg"
]
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/epilot-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"typescript": "^4.5.5"
},
"dependencies": {
"@epilot/address-suggestions-client": "^0.0.2",
"@epilot/address-suggestions-client": "^0.0.5",
"@epilot/auth": "^0.5.3",
"@epilot/automation-client": "^2.3.0",
"@epilot/customer-portal-client": "^0.8.35",
Expand Down
Loading