Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Jan 8, 2025
1 parent c303d05 commit c1ffdb1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prelude%2Fprelude-c2d315d9176eaab871bd9caca815b3806646706b9ef1af0ddbb2253ffd821efb.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prelude%2Fprelude-f4068a5a3ee027f16de68f9f411e9f52a83354e76ad8291ec02c4b7a1b53ccd3.yml
31 changes: 28 additions & 3 deletions src/resources/verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,16 @@ export namespace VerificationCreateParams {
*/
export interface Options {
/**
* The Android SMS Retriever API hash code that identifies your app. This allows
* you to automatically retrieve and fill the OTP code on Android devices.
* This allows you to automatically retrieve and fill the OTP code on mobile apps.
* Currently only Android devices are supported.
*/
app_realm?: string;
app_realm?: Options.AppRealm;

/**
* The size of the code generated. It should be between 4 and 8. Defaults to the
* code size specified from the Dashboard.
*/
code_size?: number;

/**
* The custom code to use for OTP verification. This feature is only available for
Expand Down Expand Up @@ -177,6 +183,25 @@ export namespace VerificationCreateParams {
template_id?: string;
}

export namespace Options {
/**
* This allows you to automatically retrieve and fill the OTP code on mobile apps.
* Currently only Android devices are supported.
*/
export interface AppRealm {
/**
* The platform the SMS will be sent to. We are currently only supporting
* "android".
*/
platform: 'android';

/**
* The Android SMS Retriever API hash code that identifies your app.
*/
value: string;
}
}

/**
* The signals used for anti-fraud.
*/
Expand Down
3 changes: 2 additions & 1 deletion tests/api-resources/verification.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ describe('resource verification', () => {
target: { type: 'phone_number', value: '+30123456789' },
metadata: { correlation_id: 'correlation_id' },
options: {
app_realm: 'app_realm',
app_realm: { platform: 'android', value: 'value' },
code_size: 5,
custom_code: 'custom_code',
locale: 'el-GR',
sender_id: 'sender_id',
Expand Down

0 comments on commit c1ffdb1

Please sign in to comment.