This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1324 from Shopify/liz/2024-04
Add 2024-04 API version
- Loading branch information
Showing
149 changed files
with
26,405 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@shopify/shopify-api": minor | ||
--- | ||
|
||
Added support for the 2024-04 API version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
112 changes: 112 additions & 0 deletions
112
packages/shopify-api/rest/admin/2024-04/abandoned_checkout.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
/*********************************************************************************************************************** | ||
* This file is auto-generated. If you have an issue, please create a GitHub issue. * | ||
***********************************************************************************************************************/ | ||
|
||
import {Base} from '../../base'; | ||
import {ResourcePath, ResourceNames} from '../../types'; | ||
import {Session} from '../../../lib/session/session'; | ||
import {ApiVersion} from '../../../lib/types'; | ||
|
||
import {Currency} from './currency'; | ||
import {Customer} from './customer'; | ||
import {DiscountCode} from './discount_code'; | ||
|
||
interface CheckoutsArgs { | ||
[key: string]: unknown; | ||
session: Session; | ||
since_id?: unknown; | ||
created_at_min?: unknown; | ||
created_at_max?: unknown; | ||
updated_at_min?: unknown; | ||
updated_at_max?: unknown; | ||
status?: unknown; | ||
limit?: unknown; | ||
} | ||
|
||
export class AbandonedCheckout extends Base { | ||
public static apiVersion = ApiVersion.April24; | ||
|
||
protected static hasOne: {[key: string]: typeof Base} = { | ||
"currency": Currency, | ||
"customer": Customer | ||
}; | ||
protected static hasMany: {[key: string]: typeof Base} = { | ||
"discount_codes": DiscountCode | ||
}; | ||
protected static paths: ResourcePath[] = [ | ||
{"http_method": "get", "operation": "checkouts", "ids": [], "path": "checkouts.json"}, | ||
{"http_method": "get", "operation": "checkouts", "ids": [], "path": "checkouts.json"} | ||
]; | ||
protected static resourceNames: ResourceNames[] = [ | ||
{ | ||
"singular": "abandoned_checkout", | ||
"plural": "abandoned_checkouts" | ||
} | ||
]; | ||
|
||
public static async checkouts( | ||
{ | ||
session, | ||
since_id = null, | ||
created_at_min = null, | ||
created_at_max = null, | ||
updated_at_min = null, | ||
updated_at_max = null, | ||
status = null, | ||
limit = null, | ||
...otherArgs | ||
}: CheckoutsArgs | ||
): Promise<unknown> { | ||
const response = await this.request<AbandonedCheckout>({ | ||
http_method: "get", | ||
operation: "checkouts", | ||
session: session, | ||
urlIds: {}, | ||
params: {"since_id": since_id, "created_at_min": created_at_min, "created_at_max": created_at_max, "updated_at_min": updated_at_min, "updated_at_max": updated_at_max, "status": status, "limit": limit, ...otherArgs}, | ||
body: {}, | ||
entity: null, | ||
}); | ||
|
||
return response ? response.body : null; | ||
} | ||
|
||
public abandoned_checkout_url: string | null; | ||
public billing_address: {[key: string]: unknown} | null; | ||
public buyer_accepts_marketing: boolean | null; | ||
public buyer_accepts_sms_marketing: boolean | null; | ||
public cart_token: string | null; | ||
public closed_at: string | null; | ||
public completed_at: string | null; | ||
public created_at: string | null; | ||
public currency: Currency | null | {[key: string]: any}; | ||
public customer: Customer | null | {[key: string]: any}; | ||
public customer_locale: string | null; | ||
public device_id: number | null; | ||
public discount_codes: DiscountCode[] | null | {[key: string]: any}; | ||
public email: string | null; | ||
public gateway: string | null; | ||
public id: number | null; | ||
public landing_site: string | null; | ||
public line_items: {[key: string]: unknown} | null; | ||
public location_id: number | null; | ||
public note: string | null; | ||
public phone: string | null; | ||
public presentment_currency: string | null; | ||
public referring_site: string | null; | ||
public shipping_address: {[key: string]: unknown} | null; | ||
public shipping_lines: {[key: string]: unknown} | null; | ||
public sms_marketing_phone: string | null; | ||
public source_name: string | null; | ||
public subtotal_price: string | null; | ||
public tax_lines: {[key: string]: unknown} | null; | ||
public taxes_included: boolean | null; | ||
public token: string | null; | ||
public total_discounts: string | null; | ||
public total_duties: string | null; | ||
public total_line_items_price: string | null; | ||
public total_price: string | null; | ||
public total_tax: string | null; | ||
public total_weight: number | null; | ||
public updated_at: string | null; | ||
public user_id: number | null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/*********************************************************************************************************************** | ||
* This file is auto-generated. If you have an issue, please create a GitHub issue. * | ||
***********************************************************************************************************************/ | ||
|
||
import {Base, FindAllResponse} from '../../base'; | ||
import {ResourcePath, ResourceNames} from '../../types'; | ||
import {Session} from '../../../lib/session/session'; | ||
import {ApiVersion} from '../../../lib/types'; | ||
|
||
interface AllArgs { | ||
[key: string]: unknown; | ||
session: Session; | ||
} | ||
|
||
export class AccessScope extends Base { | ||
public static apiVersion = ApiVersion.April24; | ||
|
||
protected static hasOne: {[key: string]: typeof Base} = {}; | ||
protected static hasMany: {[key: string]: typeof Base} = {}; | ||
protected static customPrefix: string | null = "/admin/oauth"; | ||
protected static paths: ResourcePath[] = [ | ||
{"http_method": "get", "operation": "get", "ids": [], "path": "access_scopes.json"} | ||
]; | ||
protected static resourceNames: ResourceNames[] = [ | ||
{ | ||
"singular": "access_scope", | ||
"plural": "access_scopes" | ||
} | ||
]; | ||
|
||
public static async all( | ||
{ | ||
session, | ||
...otherArgs | ||
}: AllArgs | ||
): Promise<FindAllResponse<AccessScope>> { | ||
const response = await this.baseFind<AccessScope>({ | ||
session: session, | ||
urlIds: {}, | ||
params: {...otherArgs}, | ||
}); | ||
|
||
return response; | ||
} | ||
|
||
public handle: string | null; | ||
public access_scopes: {[key: string]: unknown}[] | null; | ||
} |
97 changes: 97 additions & 0 deletions
97
packages/shopify-api/rest/admin/2024-04/apple_pay_certificate.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/*********************************************************************************************************************** | ||
* This file is auto-generated. If you have an issue, please create a GitHub issue. * | ||
***********************************************************************************************************************/ | ||
|
||
import {Base} from '../../base'; | ||
import {ResourcePath, ResourceNames} from '../../types'; | ||
import {Session} from '../../../lib/session/session'; | ||
import {ApiVersion} from '../../../lib/types'; | ||
|
||
interface FindArgs { | ||
session: Session; | ||
id: number | string; | ||
} | ||
interface DeleteArgs { | ||
session: Session; | ||
id: number | string; | ||
} | ||
interface CsrArgs { | ||
[key: string]: unknown; | ||
session: Session; | ||
id: number | string; | ||
} | ||
|
||
export class ApplePayCertificate extends Base { | ||
public static apiVersion = ApiVersion.April24; | ||
|
||
protected static hasOne: {[key: string]: typeof Base} = {}; | ||
protected static hasMany: {[key: string]: typeof Base} = {}; | ||
protected static paths: ResourcePath[] = [ | ||
{"http_method": "delete", "operation": "delete", "ids": ["id"], "path": "apple_pay_certificates/<id>.json"}, | ||
{"http_method": "get", "operation": "csr", "ids": ["id"], "path": "apple_pay_certificates/<id>/csr.json"}, | ||
{"http_method": "get", "operation": "get", "ids": ["id"], "path": "apple_pay_certificates/<id>.json"}, | ||
{"http_method": "post", "operation": "post", "ids": [], "path": "apple_pay_certificates.json"}, | ||
{"http_method": "put", "operation": "put", "ids": ["id"], "path": "apple_pay_certificates/<id>.json"} | ||
]; | ||
protected static resourceNames: ResourceNames[] = [ | ||
{ | ||
"singular": "apple_pay_certificate", | ||
"plural": "apple_pay_certificates" | ||
} | ||
]; | ||
|
||
public static async find( | ||
{ | ||
session, | ||
id | ||
}: FindArgs | ||
): Promise<ApplePayCertificate | null> { | ||
const result = await this.baseFind<ApplePayCertificate>({ | ||
session: session, | ||
urlIds: {"id": id}, | ||
params: {}, | ||
}); | ||
return result.data ? result.data[0] : null; | ||
} | ||
|
||
public static async delete( | ||
{ | ||
session, | ||
id | ||
}: DeleteArgs | ||
): Promise<unknown> { | ||
const response = await this.request<ApplePayCertificate>({ | ||
http_method: "delete", | ||
operation: "delete", | ||
session: session, | ||
urlIds: {"id": id}, | ||
params: {}, | ||
}); | ||
|
||
return response ? response.body : null; | ||
} | ||
|
||
public static async csr( | ||
{ | ||
session, | ||
id, | ||
...otherArgs | ||
}: CsrArgs | ||
): Promise<unknown> { | ||
const response = await this.request<ApplePayCertificate>({ | ||
http_method: "get", | ||
operation: "csr", | ||
session: session, | ||
urlIds: {"id": id}, | ||
params: {...otherArgs}, | ||
body: {}, | ||
entity: null, | ||
}); | ||
|
||
return response ? response.body : null; | ||
} | ||
|
||
public id: number | null; | ||
public merchant_id: string | null; | ||
public status: string | null; | ||
} |
85 changes: 85 additions & 0 deletions
85
packages/shopify-api/rest/admin/2024-04/application_charge.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/*********************************************************************************************************************** | ||
* This file is auto-generated. If you have an issue, please create a GitHub issue. * | ||
***********************************************************************************************************************/ | ||
|
||
import {Base, FindAllResponse} from '../../base'; | ||
import {ResourcePath, ResourceNames} from '../../types'; | ||
import {Session} from '../../../lib/session/session'; | ||
import {ApiVersion} from '../../../lib/types'; | ||
|
||
import {Currency} from './currency'; | ||
|
||
interface FindArgs { | ||
session: Session; | ||
id: number | string; | ||
fields?: unknown; | ||
} | ||
interface AllArgs { | ||
[key: string]: unknown; | ||
session: Session; | ||
since_id?: unknown; | ||
fields?: unknown; | ||
} | ||
|
||
export class ApplicationCharge extends Base { | ||
public static apiVersion = ApiVersion.April24; | ||
|
||
protected static hasOne: {[key: string]: typeof Base} = { | ||
"currency": Currency | ||
}; | ||
protected static hasMany: {[key: string]: typeof Base} = {}; | ||
protected static paths: ResourcePath[] = [ | ||
{"http_method": "get", "operation": "get", "ids": [], "path": "application_charges.json"}, | ||
{"http_method": "get", "operation": "get", "ids": ["id"], "path": "application_charges/<id>.json"}, | ||
{"http_method": "post", "operation": "post", "ids": [], "path": "application_charges.json"} | ||
]; | ||
protected static resourceNames: ResourceNames[] = [ | ||
{ | ||
"singular": "application_charge", | ||
"plural": "application_charges" | ||
} | ||
]; | ||
|
||
public static async find( | ||
{ | ||
session, | ||
id, | ||
fields = null | ||
}: FindArgs | ||
): Promise<ApplicationCharge | null> { | ||
const result = await this.baseFind<ApplicationCharge>({ | ||
session: session, | ||
urlIds: {"id": id}, | ||
params: {"fields": fields}, | ||
}); | ||
return result.data ? result.data[0] : null; | ||
} | ||
|
||
public static async all( | ||
{ | ||
session, | ||
since_id = null, | ||
fields = null, | ||
...otherArgs | ||
}: AllArgs | ||
): Promise<FindAllResponse<ApplicationCharge>> { | ||
const response = await this.baseFind<ApplicationCharge>({ | ||
session: session, | ||
urlIds: {}, | ||
params: {"since_id": since_id, "fields": fields, ...otherArgs}, | ||
}); | ||
|
||
return response; | ||
} | ||
|
||
public confirmation_url: string | null; | ||
public created_at: string | null; | ||
public currency: Currency | null | {[key: string]: any}; | ||
public id: number | null; | ||
public name: string | null; | ||
public price: string | number | null; | ||
public return_url: string | null; | ||
public status: string | null; | ||
public test: boolean | null; | ||
public updated_at: string | null; | ||
} |
Oops, something went wrong.