Skip to content

Commit

Permalink
v2.0.33
Browse files Browse the repository at this point in the history
  • Loading branch information
gtsvetanov committed Jul 3, 2021
1 parent e68c920 commit 3729200
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 92 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentecacommerce/sdk",
"sideEffects": false,
"version": "2.0.32",
"version": "2.0.33",
"description": "OpenAPI client for sentecacommerce platform",
"author": "Stanislav Bogdanov",
"main": "dist/cjs/index.js",
Expand Down
30 changes: 15 additions & 15 deletions src/apis/fulfillment/ShippingsEcontAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,62 +46,62 @@ export class ShippingsEcontAPI extends BaseAPI {
return (response as unknown) as any;
}

async fetchCountries (dto: EcontAuthenticationCredentialsDTO): Promise<EcontLocationCountryDTO[]> {
async fetchCountries (query: { username: string, password: string }): Promise<EcontLocationCountryDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/econt/fetch/countries`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EcontLocationCountryDTO[];
}

async fetchCities (dto: EcontAuthenticationCredentialsDTO): Promise<EcontLocationCityDTO[]> {
async fetchCities (query: { username: string, password: string }): Promise<EcontLocationCityDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/econt/fetch/cities`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EcontLocationCityDTO[];
}

async fetchQuarters (dto: EcontAuthenticationCredentialsDTO): Promise<EcontLocationQuarterDTO[]> {
async fetchQuarters (query: { username: string, password: string }): Promise<EcontLocationQuarterDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/econt/fetch/quarters`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EcontLocationQuarterDTO[];
}

async fetchStreets (dto: EcontAuthenticationCredentialsDTO): Promise<EcontLocationStreetDTO[]> {
async fetchStreets (query: { username: string, password: string }): Promise<EcontLocationStreetDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/econt/fetch/streets`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EcontLocationStreetDTO[];
}

async fetchOffices (dto: EcontAuthenticationCredentialsDTO): Promise<EcontLocationOfficeDTO[]> {
async fetchOffices (query: { username: string, password: string }): Promise<EcontLocationOfficeDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/econt/fetch/offices`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EcontLocationOfficeDTO[];
}
Expand Down
30 changes: 15 additions & 15 deletions src/apis/fulfillment/ShippingsEvropatAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,62 +47,62 @@ export class ShippingsEvropatAPI extends BaseAPI {
return (response as unknown) as any;
}

async fetchCountries (dto: EvropatAuthenticationCredentialsDTO): Promise<EvropatLocationCountryDTO[]> {
async fetchCountries (query: { clientKey: string }): Promise<EvropatLocationCountryDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/evropat/fetch/countries`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EvropatLocationCountryDTO[];
}

async fetchCities (dto: EvropatAuthenticationCredentialsDTO): Promise<EvropatLocationCityDTO[]> {
async fetchCities (query: { clientKey: string }): Promise<EvropatLocationCityDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/evropat/fetch/cities`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EvropatLocationCityDTO[];
}

async fetchQuarters (dto: EvropatAuthenticationCredentialsDTO): Promise<EvropatLocationQuarterDTO[]> {
async fetchQuarters (query: { clientKey: string }): Promise<EvropatLocationQuarterDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/evropat/fetch/quarters`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EvropatLocationQuarterDTO[];
}

async fetchStreets (dto: EvropatAuthenticationCredentialsDTO): Promise<EvropatLocationStreetDTO[]> {
async fetchStreets (query: { clientKey: string }): Promise<EvropatLocationStreetDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/evropat/fetch/streets`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EvropatLocationStreetDTO[];
}

async fetchOffices (dto: EvropatAuthenticationCredentialsDTO): Promise<EvropatLocationOfficeDTO[]> {
async fetchOffices (query: { clientKey: string }): Promise<EvropatLocationOfficeDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/evropat/fetch/offices`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EvropatLocationOfficeDTO[];
}
Expand Down
30 changes: 15 additions & 15 deletions src/apis/fulfillment/ShippingsSpeedyAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,62 +45,62 @@ export class ShippingsSpeedyAPI extends BaseAPI {
return (response as unknown) as any;
}

async fetchCountries (dto: SpeedyAuthenticationCredentialsDTO): Promise<SpeedyLocationCountryDTO[]> {
async fetchCountries (query: { username: string, password: string }): Promise<SpeedyLocationCountryDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/speedy/fetch/countries`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as SpeedyLocationCountryDTO[];
}

async fetchCities (dto: SpeedyAuthenticationCredentialsDTO): Promise<SpeedyLocationCityDTO[]> {
async fetchCities (query: { username: string, password: string }): Promise<SpeedyLocationCityDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/speedy/fetch/cities`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as SpeedyLocationCityDTO[];
}

async fetchQuarters (dto: SpeedyAuthenticationCredentialsDTO): Promise<SpeedyLocationQuarterDTO[]> {
async fetchQuarters (query: { username: string, password: string }): Promise<SpeedyLocationQuarterDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/speedy/fetch/quarters`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as SpeedyLocationQuarterDTO[];
}

async fetchStreets (dto: SpeedyAuthenticationCredentialsDTO): Promise<SpeedyLocationStreetDTO[]> {
async fetchStreets (query: { username: string, password: string }): Promise<SpeedyLocationStreetDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/speedy/fetch/streets`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as SpeedyLocationStreetDTO[];
}

async fetchOffices (dto: SpeedyAuthenticationCredentialsDTO): Promise<SpeedyLocationOfficeDTO[]> {
async fetchOffices (query: { username: string, password: string }): Promise<SpeedyLocationOfficeDTO[]> {
const response = await this._request({
path: `/fulfillment/shippings/speedy/fetch/offices`,
method: 'GET',
query: this._stringifyQuery(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as SpeedyLocationOfficeDTO[];
}
Expand Down
12 changes: 12 additions & 0 deletions src/apis/users/CustomersAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,18 @@ export class CustomersAPI extends BaseAPI {
return (response as unknown) as CustomerSearchResultDTO;
}

async getByExternalId (externalId: string): Promise<CustomerDTO> {
const response = await this._request({
path: `/users/customers/externalId=${encodeURIComponent(externalId)}`,
method: 'GET',




});
return (response as unknown) as CustomerDTO;
}

async getById (id: string): Promise<CustomerDTO> {
const response = await this._request({
path: `/users/customers/${encodeURIComponent(id)}`,
Expand Down
1 change: 1 addition & 0 deletions src/models/EcontCreateRequestDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface EcontCreateRequestDTO {
senderClient: EcontClientProfile;
senderAgent: EcontClientProfile;
senderAddress?: EcontAddress;
cashOnDeliveryAgreement: string;
senderOffice?: string;
smsNotification?: boolean;
declaredValue?: boolean;
Expand Down
30 changes: 15 additions & 15 deletions src/v2/apis/fulfillment/ShippingsEcontAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,62 +47,62 @@ export const ShippingsEcontSyncLocations = async (dto: EcontAuthenticationCreden
return (response as unknown) as any;
}

export const ShippingsEcontFetchCountries = async (dto: EcontAuthenticationCredentialsDTO): Promise<EcontLocationCountryDTO[]> => {
export const ShippingsEcontFetchCountries = async (query: { username: string, password: string }): Promise<EcontLocationCountryDTO[]> => {
const response = await HttpClient.request({
path: `/fulfillment/shippings/econt/fetch/countries`,
method: 'GET',
query: toQueryString(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EcontLocationCountryDTO[];
}

export const ShippingsEcontFetchCities = async (dto: EcontAuthenticationCredentialsDTO): Promise<EcontLocationCityDTO[]> => {
export const ShippingsEcontFetchCities = async (query: { username: string, password: string }): Promise<EcontLocationCityDTO[]> => {
const response = await HttpClient.request({
path: `/fulfillment/shippings/econt/fetch/cities`,
method: 'GET',
query: toQueryString(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EcontLocationCityDTO[];
}

export const ShippingsEcontFetchQuarters = async (dto: EcontAuthenticationCredentialsDTO): Promise<EcontLocationQuarterDTO[]> => {
export const ShippingsEcontFetchQuarters = async (query: { username: string, password: string }): Promise<EcontLocationQuarterDTO[]> => {
const response = await HttpClient.request({
path: `/fulfillment/shippings/econt/fetch/quarters`,
method: 'GET',
query: toQueryString(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EcontLocationQuarterDTO[];
}

export const ShippingsEcontFetchStreets = async (dto: EcontAuthenticationCredentialsDTO): Promise<EcontLocationStreetDTO[]> => {
export const ShippingsEcontFetchStreets = async (query: { username: string, password: string }): Promise<EcontLocationStreetDTO[]> => {
const response = await HttpClient.request({
path: `/fulfillment/shippings/econt/fetch/streets`,
method: 'GET',
query: toQueryString(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EcontLocationStreetDTO[];
}

export const ShippingsEcontFetchOffices = async (dto: EcontAuthenticationCredentialsDTO): Promise<EcontLocationOfficeDTO[]> => {
export const ShippingsEcontFetchOffices = async (query: { username: string, password: string }): Promise<EcontLocationOfficeDTO[]> => {
const response = await HttpClient.request({
path: `/fulfillment/shippings/econt/fetch/offices`,
method: 'GET',
query: toQueryString(query),


body: dto,

contentType: 'application/json',
});
return (response as unknown) as EcontLocationOfficeDTO[];
}
Expand Down
Loading

0 comments on commit 3729200

Please sign in to comment.