Skip to content

Commit

Permalink
feat: contest types implemented issue #10
Browse files Browse the repository at this point in the history
  • Loading branch information
algoflows committed Mar 3, 2022
1 parent 9b79f2e commit e668057
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
32 changes: 32 additions & 0 deletions types/Customer/Contests.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
declare module 'aifi' {
namespace Aifi {
namespace Customer {
interface ContestCreateParams {
/**
* The order id to be contested
*/
orderId: string;

/**
* The customer's email address.
*/
message: string;

/**
* Items array
*/
items: Aifi.Model.ContestItem[];
}

class ContestsResource {
/**
* Retrieves an auth token.
*/
create(
params: ContestCreateParams,
options?: RequestOptions
): Promise<Aifi.Response<Aifi.Model.ContestItem[]>>;
}
}
}
}
40 changes: 40 additions & 0 deletions types/Models/Contest.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
declare module 'aifi' {
namespace Aifi {
namespace Model {
/**
* The contest object.
*/
interface ContestItem {
/**
* TODO: What is rin, clarify??
*/
rin?: string;

/**
* Unique identifier for the product.
*/
productId: string;

/**
* Item Quantity.
*/
quantity?: number;

/**
* Original quantity.
*/
originalQuantity?: number;

/**
* Contested quantity.
*/
contestedQuantity?: number;

/**
* Reviewed quantity.
*/
reviewedQuantity?: number;
}
}
}
}

0 comments on commit e668057

Please sign in to comment.