Skip to content

Commit 9e9c73e

Browse files
committed
chore: release model
1 parent f7658bd commit 9e9c73e

File tree

2 files changed

+141
-1
lines changed

2 files changed

+141
-1
lines changed

ask-sdk-model/index.ts

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,6 +2329,17 @@ export namespace services.monetization {
23292329
}
23302330
}
23312331

2332+
export namespace services.monetization {
2333+
/**
2334+
*
2335+
* @interface
2336+
*/
2337+
export interface InSkillProductTransactionsResponse {
2338+
'results': Array<services.monetization.Transactions>;
2339+
'metadata': services.monetization.Metadata;
2340+
}
2341+
}
2342+
23322343
export namespace services.monetization {
23332344
/**
23342345
*
@@ -2341,6 +2352,16 @@ export namespace services.monetization {
23412352
}
23422353
}
23432354

2355+
export namespace services.monetization {
2356+
/**
2357+
*
2358+
* @interface
2359+
*/
2360+
export interface Metadata {
2361+
'resultSet'?: services.monetization.ResultSet;
2362+
}
2363+
}
2364+
23442365
export namespace services.monetization {
23452366
/**
23462367
* Product type. * 'SUBSCRIPTION' - Once purchased, customers will own the content for the subscription period. * 'ENTITLEMENT' - Once purchased, customers will own the content forever. * 'CONSUMABLE' - Once purchased, customers will be entitled to the content until it is consumed. It can also be re-purchased.
@@ -2365,6 +2386,37 @@ export namespace services.monetization {
23652386
export type PurchaseMode = 'TEST' | 'LIVE';
23662387
}
23672388

2389+
export namespace services.monetization {
2390+
/**
2391+
*
2392+
* @interface
2393+
*/
2394+
export interface ResultSet {
2395+
'nextToken'?: string;
2396+
}
2397+
}
2398+
2399+
export namespace services.monetization {
2400+
/**
2401+
* Transaction status for in skill product purchases. * 'PENDING_APPROVAL_BY_PARENT' - The transaction is pending approval from parent. * 'APPROVED_BY_PARENT' - The transaction was approved by parent and fulfilled successfully.. * 'DENIED_BY_PARENT' - The transaction was declined by parent and hence not fulfilled. * 'EXPIRED_NO_ACTION_BY_PARENT' - The transaction was expired due to no response from parent and hence not fulfilled. * 'ERROR' - The transaction was not fullfiled as there was an error while processing the transaction.
2402+
* @enum
2403+
*/
2404+
export type Status = 'PENDING_APPROVAL_BY_PARENT' | 'APPROVED_BY_PARENT' | 'DENIED_BY_PARENT' | 'EXPIRED_NO_ACTION_BY_PARENT' | 'ERROR';
2405+
}
2406+
2407+
export namespace services.monetization {
2408+
/**
2409+
*
2410+
* @interface
2411+
*/
2412+
export interface Transactions {
2413+
'status'?: services.monetization.Status;
2414+
'productId'?: string;
2415+
'createdTime'?: string;
2416+
'lastModifiedTime'?: string;
2417+
}
2418+
}
2419+
23682420
export namespace services.proactiveEvents {
23692421
/**
23702422
*
@@ -5497,6 +5549,94 @@ export namespace services.monetization {
54975549
errorDefinitions.set(404, "Requested resource not found.");
54985550
errorDefinitions.set(500, "Internal Server Error.");
54995551

5552+
return this.invoke("GET", this.apiConfiguration.apiEndpoint, path,
5553+
pathParams, queryParams, headerParams, null, errorDefinitions);
5554+
}
5555+
/**
5556+
*
5557+
* @param {string} acceptLanguage User&#39;s locale/language in context
5558+
* @param {string} productId Product Id.
5559+
* @param {string} status Transaction status for in skill product purchases. * &#39;PENDING_APPROVAL_BY_PARENT&#39; - The transaction is pending approval from parent. * &#39;APPROVED_BY_PARENT&#39; - The transaction was approved by parent and fulfilled successfully.. * &#39;DENIED_BY_PARENT&#39; - The transaction was declined by parent and hence not fulfilled. * &#39;EXPIRED_NO_ACTION_BY_PARENT&#39; - The transaction was expired due to no response from parent and hence not fulfilled. * &#39;ERROR&#39; - The transaction was not fullfiled as there was an error while processing the transaction.
5560+
* @param {string} fromLastModifiedTime Filter transactions based on last modified time stamp, FROM duration in format (UTC ISO 8601) i.e. yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39;Z&#39;
5561+
* @param {string} toLastModifiedTime Filter transactions based on last modified time stamp, TO duration in format (UTC ISO 8601) i.e. yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39;Z&#39;
5562+
* @param {string} nextToken When response to this API call is truncated, the response also includes the nextToken in metadata, the value of which can be used in the next request as the continuation-token to list the next set of objects. The continuation token is an opaque value that In-Skill Products API understands. Token has expiry of 24 hours.
5563+
* @param {number} maxResults sets the maximum number of results returned in the response body. If you want to retrieve fewer than upper limit of 100 results, you can add this parameter to your request. maxResults should not exceed the upper limit. The response might contain fewer results than maxResults, but it will never contain more. If there are additional results that satisfy the search criteria, but these results were not returned because maxResults was exceeded, the response contains nextToken which can be used to fetch next set of result.
5564+
*/
5565+
async getInSkillProductsTransactions(acceptLanguage : string, productId? : string, status? : string, fromLastModifiedTime? : string, toLastModifiedTime? : string, nextToken? : string, maxResults? : number) : Promise<services.monetization.InSkillProductTransactionsResponse> {
5566+
const __operationId__ = 'getInSkillProductsTransactions';
5567+
// verify required parameter 'acceptLanguage' is not null or undefined
5568+
if (acceptLanguage == null) {
5569+
throw new Error(`Required parameter acceptLanguage was null or undefined when calling ${__operationId__}.`);
5570+
}
5571+
5572+
const queryParams : Map<string, string> = new Map<string, string>();
5573+
if(productId != null) {
5574+
queryParams.set('productId', productId);
5575+
}
5576+
if(status != null) {
5577+
queryParams.set('status', status);
5578+
}
5579+
if(fromLastModifiedTime != null) {
5580+
queryParams.set('fromLastModifiedTime', fromLastModifiedTime.toString());
5581+
}
5582+
if(toLastModifiedTime != null) {
5583+
queryParams.set('toLastModifiedTime', toLastModifiedTime.toString());
5584+
}
5585+
if(nextToken != null) {
5586+
queryParams.set('nextToken', nextToken);
5587+
}
5588+
if(maxResults != null) {
5589+
queryParams.set('maxResults', maxResults.toString());
5590+
}
5591+
5592+
const headerParams : Array<{key : string, value : string}> = [];
5593+
headerParams.push({key : 'Content-type', value : 'application/json'});
5594+
headerParams.push({key : 'Accept-Language', value : acceptLanguage});
5595+
5596+
const pathParams : Map<string, string> = new Map<string, string>();
5597+
5598+
const authorizationValue = "Bearer " + this.apiConfiguration.authorizationValue;
5599+
headerParams.push({key : "Authorization", value : authorizationValue});
5600+
5601+
let path : string = "/v1/users/~current/skills/~current/inSkillProductsTransactions";
5602+
5603+
const errorDefinitions : Map<number, string> = new Map<number, string>();
5604+
errorDefinitions.set(200, "Returns a list of transactions of all in skill products purchases in last 30 days on success.");
5605+
errorDefinitions.set(400, "Invalid request");
5606+
errorDefinitions.set(401, "The authentication token is invalid or doesn&#39;t have access to make this request");
5607+
errorDefinitions.set(403, "Forbidden request");
5608+
errorDefinitions.set(404, "Product id doesn&#39;t exist / invalid / not found.");
5609+
errorDefinitions.set(412, "Non-Child Directed Skill is not supported.");
5610+
errorDefinitions.set(429, "The request is throttled.");
5611+
errorDefinitions.set(500, "Internal Server Error");
5612+
5613+
return this.invoke("GET", this.apiConfiguration.apiEndpoint, path,
5614+
pathParams, queryParams, headerParams, null, errorDefinitions);
5615+
}
5616+
/**
5617+
*
5618+
*/
5619+
async getVoicePurchaseSetting() : Promise<boolean> {
5620+
const __operationId__ = 'getVoicePurchaseSetting';
5621+
5622+
const queryParams : Map<string, string> = new Map<string, string>();
5623+
5624+
const headerParams : Array<{key : string, value : string}> = [];
5625+
headerParams.push({key : 'Content-type', value : 'application/json'});
5626+
5627+
const pathParams : Map<string, string> = new Map<string, string>();
5628+
5629+
const authorizationValue = "Bearer " + this.apiConfiguration.authorizationValue;
5630+
headerParams.push({key : "Authorization", value : authorizationValue});
5631+
5632+
let path : string = "/v1/users/~current/skills/~current/settings/voicePurchasing.enabled";
5633+
5634+
const errorDefinitions : Map<number, string> = new Map<number, string>();
5635+
errorDefinitions.set(200, "Returns a boolean value for voice purchase setting on success.");
5636+
errorDefinitions.set(400, "Invalid request.");
5637+
errorDefinitions.set(401, "The authentication token is invalid or doesn&#39;t have access to make this request");
5638+
errorDefinitions.set(500, "Internal Server Error.");
5639+
55005640
return this.invoke("GET", this.apiConfiguration.apiEndpoint, path,
55015641
pathParams, queryParams, headerParams, null, errorDefinitions);
55025642
}

ask-sdk-model/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ask-sdk-model",
3-
"version": "1.21.0",
3+
"version": "1.22.0",
44
"description": "Model package for Alexa Skills Kit SDK",
55
"main": "index.js",
66
"types": "index.d.ts",

0 commit comments

Comments
 (0)