|
|
|
@ -19,6 +19,46 @@ use EasyAlipay\OpenPlatform\Authorizer\Mini\Model\VersionUploadContentBuilder;
@@ -19,6 +19,46 @@ use EasyAlipay\OpenPlatform\Authorizer\Mini\Model\VersionUploadContentBuilder;
|
|
|
|
|
|
|
|
|
|
class Client extends AppClient |
|
|
|
|
{ |
|
|
|
|
/** |
|
|
|
|
* 小程序版本列表 |
|
|
|
|
* @return \EasyAlipay\Kernel\Support\Collection |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\BadRequestException |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidArgumentException |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidConfigException |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException |
|
|
|
|
* @throws \GuzzleHttp\Exception\GuzzleException |
|
|
|
|
*/ |
|
|
|
|
public function list() |
|
|
|
|
{ |
|
|
|
|
$request = new AppRequest(); |
|
|
|
|
$request->setApiMethodName("alipay.open.mini.version.list.query"); |
|
|
|
|
return ($this->execute($request)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 小程序版本详情 |
|
|
|
|
* @param string $appVersion |
|
|
|
|
* @param string $bundleId |
|
|
|
|
* @return \EasyAlipay\Kernel\Support\Collection |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\BadRequestException |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidArgumentException |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidConfigException |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException |
|
|
|
|
* @throws \GuzzleHttp\Exception\GuzzleException |
|
|
|
|
*/ |
|
|
|
|
public function query(string $appVersion, string $bundleId = '') |
|
|
|
|
{ |
|
|
|
|
$contentBuilder = new VersionOnlineContentBuilder(); |
|
|
|
|
$contentBuilder->setAppVersion($appVersion); |
|
|
|
|
if (!empty($bundleId)) { |
|
|
|
|
$contentBuilder->setBundleId($bundleId); |
|
|
|
|
} |
|
|
|
|
$request = new AppRequest(); |
|
|
|
|
$request->setBizContent($contentBuilder->getBizContent()); |
|
|
|
|
$request->setApiMethodName("alipay.open.mini.version.detail.query"); |
|
|
|
|
return ($this->execute($request)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 上传构建小程序 |
|
|
|
|
* @param array $payload |
|
|
|
@ -124,7 +164,7 @@ class Client extends AppClient
@@ -124,7 +164,7 @@ class Client extends AppClient
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 撤销审核 |
|
|
|
|
* 退回开发 |
|
|
|
|
* @param string $appVersion |
|
|
|
|
* @param string $bundleId |
|
|
|
|
* @return \EasyAlipay\Kernel\Support\Collection |
|
|
|
@ -143,7 +183,31 @@ class Client extends AppClient
@@ -143,7 +183,31 @@ class Client extends AppClient
|
|
|
|
|
} |
|
|
|
|
$request = new AppRequest(); |
|
|
|
|
$request->setBizContent($contentBuilder->getBizContent()); |
|
|
|
|
$request->setApiMethodName("alipay.open.mini.version.rollback"); |
|
|
|
|
$request->setApiMethodName("alipay.open.mini.version.audited.cancel"); |
|
|
|
|
return ($this->execute($request)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 撤销审核 |
|
|
|
|
* @param string $appVersion |
|
|
|
|
* @param string $bundleId |
|
|
|
|
* @return \EasyAlipay\Kernel\Support\Collection |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\BadRequestException |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidArgumentException |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidConfigException |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException |
|
|
|
|
* @throws \GuzzleHttp\Exception\GuzzleException |
|
|
|
|
*/ |
|
|
|
|
public function auditCancel(string $appVersion, string $bundleId = '') |
|
|
|
|
{ |
|
|
|
|
$contentBuilder = new VersionCancelContentBuilder(); |
|
|
|
|
$contentBuilder->setAppVersion($appVersion); |
|
|
|
|
if (!empty($bundleId)) { |
|
|
|
|
$contentBuilder->setBundleId($bundleId); |
|
|
|
|
} |
|
|
|
|
$request = new AppRequest(); |
|
|
|
|
$request->setBizContent($contentBuilder->getBizContent()); |
|
|
|
|
$request->setApiMethodName("alipay.open.mini.version.audit.cancel"); |
|
|
|
|
return ($this->execute($request)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -167,7 +231,31 @@ class Client extends AppClient
@@ -167,7 +231,31 @@ class Client extends AppClient
|
|
|
|
|
} |
|
|
|
|
$request = new AppRequest(); |
|
|
|
|
$request->setBizContent($contentBuilder->getBizContent()); |
|
|
|
|
$request->setApiMethodName("alipay.open.mini.version.audited.cancel"); |
|
|
|
|
$request->setApiMethodName("alipay.open.mini.version.rollback"); |
|
|
|
|
return ($this->execute($request)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 小程序删除版本 |
|
|
|
|
* @param string $appVersion |
|
|
|
|
* @param string $bundleId |
|
|
|
|
* @return \EasyAlipay\Kernel\Support\Collection |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\BadRequestException |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidArgumentException |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidConfigException |
|
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException |
|
|
|
|
* @throws \GuzzleHttp\Exception\GuzzleException |
|
|
|
|
*/ |
|
|
|
|
public function delete(string $appVersion, string $bundleId = '') |
|
|
|
|
{ |
|
|
|
|
$contentBuilder = new VersionRollbackContentBuilder(); |
|
|
|
|
$contentBuilder->setAppVersion($appVersion); |
|
|
|
|
if (!empty($bundleId)) { |
|
|
|
|
$contentBuilder->setBundleId($bundleId); |
|
|
|
|
} |
|
|
|
|
$request = new AppRequest(); |
|
|
|
|
$request->setBizContent($contentBuilder->getBizContent()); |
|
|
|
|
$request->setApiMethodName("alipay.open.mini.version.delete"); |
|
|
|
|
return ($this->execute($request)); |
|
|
|
|
} |
|
|
|
|
} |