|
39 | 39 | * [Grant a customer access to a package or edit the limitations](#grant-a-customer-access-to-a-package-or-edit-the-limitations)
|
40 | 40 | * [Revoke access to a package from a customer](#revoke-access-to-a-package-from-a-customer)
|
41 | 41 | * [Regenerate a customer's Composer repository token](#regenerate-a-customers-composer-repository-token)
|
| 42 | + * [List a customer's vendor bundles](#list-a-customers-vendor-bundles) |
| 43 | + * [Grant a customer access to a vendor bundle or edit the limitations](#grant-a-customer-access-to-a-vendor-bundle-or-edit-the-limitations) |
| 44 | + * [Revoke access to a vendor bundle from a customer](#revoke-access-to-a-vendor-bundle-from-a-customer) |
| 45 | + * [Vendor Bundle](#vendor-bundle) |
| 46 | + * [List an organization's vendor bundles](#list-an-organizations-vendor-bundles) |
| 47 | + * [Show a vendor bundle](#show-a-vendor-bundle) |
| 48 | + * [Create a vendor bundle](#create-a-vendor-bundle) |
| 49 | + * [Edit a customer](#edit-a-customer-1) |
| 50 | + * [Delete a vendor bundle](#delete-a-vendor-bundle) |
| 51 | + * [List packages in a vendor bundle](#list-packages-in-a-vendor-bundle) |
| 52 | + * [Add one or more packages to a vendor bundle or edit their limitations](#add-one-or-more-packages-to-a-vendor-bundle-or-edit-their-limitations) |
| 53 | + * [Remove a package from a vendor bundle](#remove-a-package-from-a-vendor-bundle) |
42 | 54 | * [Subrepository](#subrepository)
|
43 | 55 | * [List an organization's subrepositories](#list-an-organizations-subrepositories)
|
44 | 56 | * [Show a subrepository](#show-a-subrepository)
|
|
114 | 126 | * [Validate incoming webhook payloads](#validate-incoming-webhook-payloads)
|
115 | 127 | * [License](#license)
|
116 | 128 |
|
117 |
| -<!-- Added by: glaubinix, at: Tue 24 Jan 2023 14:03:21 GMT --> |
| 129 | +<!-- Added by: glaubinix, at: Thu 9 Feb 2023 15:40:34 GMT --> |
118 | 130 |
|
119 | 131 | <!--te-->
|
120 | 132 |
|
@@ -414,6 +426,100 @@ $composerRepository = $client->customers()->regenerateToken($customerId, $confir
|
414 | 426 | ```
|
415 | 427 | Returns the edited Composer repository.
|
416 | 428 |
|
| 429 | +#### List a customer's vendor bundles |
| 430 | +```php |
| 431 | +$customerId = 42; |
| 432 | +$packages = $client->customers()->vendorBundles()->listVendorBundles($customerId); |
| 433 | +``` |
| 434 | +Returns an array of customer vendor bundles. |
| 435 | + |
| 436 | +#### Grant a customer access to a vendor bundle or edit the limitations |
| 437 | +```php |
| 438 | +$customerId = 42; |
| 439 | +$vendorBundleId = 12; |
| 440 | +$expirationDate = (new \DateTime())->add(new \DateInterval('P1Y'))->format('c'), // optional expiration date to limit updates the customer receives |
| 441 | +$packages = $client->customers()->vendorBundles()->addOrEditVendorBundle($customerId, $vendorBundleId, $expirationDate); |
| 442 | +``` |
| 443 | +Returns the added or edited customer vendor bundle. |
| 444 | + |
| 445 | +#### Revoke access to a vendor bundle from a customer |
| 446 | +```php |
| 447 | +$customerId = 42; |
| 448 | +$vendorBundleId = 12; |
| 449 | +$client->customers()->vendorBundles()->removeVendorBundle($customerId, $vendorBundleId); |
| 450 | +``` |
| 451 | + |
| 452 | +### Vendor Bundle |
| 453 | + |
| 454 | +#### List an organization's vendor bundles |
| 455 | +```php |
| 456 | +$vendorBundles = $client->vendorBundles()->all(); |
| 457 | +``` |
| 458 | +Returns an array of vendor bundles. |
| 459 | + |
| 460 | +#### Show a vendor bundle |
| 461 | +```php |
| 462 | +$vendorBundleId = 42; |
| 463 | +$vendorBundle = $client->vendorBundles()->show($vendorBundleId); |
| 464 | +``` |
| 465 | +Returns a single vendor bundle. |
| 466 | + |
| 467 | +#### Create a vendor bundle |
| 468 | +```php |
| 469 | +$vendorBundle = $client->vendorBundles()->create('New bundle name'); |
| 470 | +// or |
| 471 | +$vendorBundle = $client->vendorBundles()->create('New bundle name', 'dev', '^1.0', true, [123]); |
| 472 | +``` |
| 473 | +Returns the vendor bundle. |
| 474 | + |
| 475 | +#### Edit a customer |
| 476 | +```php |
| 477 | +$vendorBundleId = 42; |
| 478 | +$vendorBundleData = [ |
| 479 | + 'name' => 'Bundle name', |
| 480 | + 'minimumAccessibleStability' => 'dev', |
| 481 | + 'versionConstraint' => '^1.0', |
| 482 | + 'assignAllPackages' => true, |
| 483 | + 'synchronizationIds' => [123], // A list of synchronization ids for which new packages should automatically be added to the bundle. |
| 484 | +]; |
| 485 | +$vendorBundle = $client->vendorBundles()->edit($vendorBundleId, $vendorBundleData); |
| 486 | +``` |
| 487 | +Returns the vendor bundle. |
| 488 | + |
| 489 | +#### Delete a vendor bundle |
| 490 | +```php |
| 491 | +$vendorBundleId = 42; |
| 492 | +$client->vendorBundles()->remove($vendorBundleId); |
| 493 | +``` |
| 494 | + |
| 495 | +#### List packages in a vendor bundle |
| 496 | +```php |
| 497 | +$vendorBundleId = 42; |
| 498 | +$packages = $client->vendorBundles()->packages()->listPackages($vendorBundleId); |
| 499 | +``` |
| 500 | +Returns an array of vendor bundle packages. |
| 501 | + |
| 502 | +#### Add one or more packages to a vendor bundle or edit their limitations |
| 503 | +```php |
| 504 | +$vendorBundleId = 42; |
| 505 | +$packages = [ |
| 506 | + [ |
| 507 | + 'name' => 'acme-website/package', |
| 508 | + 'versionConstraint' => '^1.0 | ^2.0', // optional version constraint to limit updates the customer receives |
| 509 | + 'minimumAccessibleStability' => 'beta', // optional stability to restrict customers to specific package version stabilities like alpha, beta, or RC |
| 510 | + ], |
| 511 | +]; |
| 512 | +$packages = $client->vendorBundles()->packages()->addOrEditPackages($vendorBundleId, $packages); |
| 513 | +``` |
| 514 | +Returns an array of all added or edited customer packages. |
| 515 | + |
| 516 | +#### Remove a package from a vendor bundle |
| 517 | +```php |
| 518 | +$vendorBundleId = 42; |
| 519 | +$packageName = 'acme-website/package'; |
| 520 | +$client->vendorBundles()->packages()->removePackage($vendorBundleId, $packageName); |
| 521 | +``` |
| 522 | + |
417 | 523 | ### Subrepository
|
418 | 524 |
|
419 | 525 | #### List an organization's subrepositories
|
|
0 commit comments