|
11 | 11 | <dd></dd> |
12 | 12 | <dt><a href="#LaunchDarklyUtilsMembers">LaunchDarklyUtilsMembers</a></dt> |
13 | 13 | <dd></dd> |
| 14 | +<dt><a href="#LaunchDarklyUtilsProjects">LaunchDarklyUtilsProjects</a></dt> |
| 15 | +<dd></dd> |
14 | 16 | <dt><a href="#LaunchDarklyUtilsRoles">LaunchDarklyUtilsRoles</a></dt> |
15 | 17 | <dd></dd> |
16 | 18 | </dl> |
@@ -377,6 +379,125 @@ Invite a New Team Member by their Email Address |
377 | 379 | | emailAddress | <code>String</code> | | Email Address of New Member | |
378 | 380 | | initialRoleKey | <code>String</code> | <code>reader</code> | Default Role for New Member | |
379 | 381 |
|
| 382 | +<a name="LaunchDarklyUtilsProjects"></a> |
| 383 | + |
| 384 | +## LaunchDarklyUtilsProjects |
| 385 | +**Kind**: global class |
| 386 | + |
| 387 | +* [LaunchDarklyUtilsProjects](#LaunchDarklyUtilsProjects) |
| 388 | + * [new LaunchDarklyUtilsProjects(apiClient, log, ldUtils)](#new_LaunchDarklyUtilsProjects_new) |
| 389 | + * [.API_GROUP](#LaunchDarklyUtilsProjects+API_GROUP) ⇒ <code>string</code> |
| 390 | + * [.getProjects()](#LaunchDarklyUtilsProjects+getProjects) ⇒ <code>Promise</code> |
| 391 | + * [.getProject(projectKey)](#LaunchDarklyUtilsProjects+getProject) ⇒ <code>Promise</code> |
| 392 | + * [.createProject(projectName, projectKey, includeInSnippetByDefault, tags, environments, defaultClientSideAvailability)](#LaunchDarklyUtilsProjects+createProject) ⇒ <code>Promise</code> |
| 393 | + * [.updateProject(projectKey, jsonPatch)](#LaunchDarklyUtilsProjects+updateProject) ⇒ <code>Promise</code> |
| 394 | + * [.deleteProject(projectKey)](#LaunchDarklyUtilsProjects+deleteProject) |
| 395 | + |
| 396 | +<a name="new_LaunchDarklyUtilsProjects_new"></a> |
| 397 | + |
| 398 | +### new LaunchDarklyUtilsProjects(apiClient, log, ldUtils) |
| 399 | +Projects specific api functions attached as 'LaunchDarklyUtils.projects' |
| 400 | + |
| 401 | +**Returns**: [<code>LaunchDarklyUtilsMembers</code>](#LaunchDarklyUtilsMembers) - team member api functions |
| 402 | + |
| 403 | +| Param | Type | Description | |
| 404 | +| --- | --- | --- | |
| 405 | +| apiClient | <code>Swagger</code> | generated launchdarkly apiClient | |
| 406 | +| log | <code>Object</code> | logger implementation, or 'console' | |
| 407 | +| ldUtils | [<code>LaunchDarklyUtils</code>](#LaunchDarklyUtils) | primary utils class | |
| 408 | + |
| 409 | +<a name="LaunchDarklyUtilsProjects+API_GROUP"></a> |
| 410 | + |
| 411 | +### launchDarklyUtilsProjects.API\_GROUP ⇒ <code>string</code> |
| 412 | +Api group object key in LD api |
| 413 | + |
| 414 | +**Kind**: instance property of [<code>LaunchDarklyUtilsProjects</code>](#LaunchDarklyUtilsProjects) |
| 415 | +<a name="LaunchDarklyUtilsProjects+getProjects"></a> |
| 416 | + |
| 417 | +### launchDarklyUtilsProjects.getProjects() ⇒ <code>Promise</code> |
| 418 | +Get all projects in account |
| 419 | + |
| 420 | +**Kind**: instance method of [<code>LaunchDarklyUtilsProjects</code>](#LaunchDarklyUtilsProjects) |
| 421 | +**Fulfil**: <code>Object</code> List of projects JSON |
| 422 | +**Reject**: <code>Error</code> object with message |
| 423 | +**Example** |
| 424 | +```js |
| 425 | +ldutils getProjects |
| 426 | +``` |
| 427 | +<a name="LaunchDarklyUtilsProjects+getProject"></a> |
| 428 | + |
| 429 | +### launchDarklyUtilsProjects.getProject(projectKey) ⇒ <code>Promise</code> |
| 430 | +get a single project by project key |
| 431 | + |
| 432 | +**Kind**: instance method of [<code>LaunchDarklyUtilsProjects</code>](#LaunchDarklyUtilsProjects) |
| 433 | +**Fulfil**: <code>Object</code> project object json |
| 434 | +**Reject**: <code>Error</code> object with message |
| 435 | + |
| 436 | +| Param | Description | |
| 437 | +| --- | --- | |
| 438 | +| projectKey | _id field of team member | |
| 439 | + |
| 440 | +**Example** |
| 441 | +```js |
| 442 | +ldutils getProject new-project |
| 443 | +``` |
| 444 | +<a name="LaunchDarklyUtilsProjects+createProject"></a> |
| 445 | + |
| 446 | +### launchDarklyUtilsProjects.createProject(projectName, projectKey, includeInSnippetByDefault, tags, environments, defaultClientSideAvailability) ⇒ <code>Promise</code> |
| 447 | +Create a project in the account |
| 448 | + |
| 449 | +**Kind**: instance method of [<code>LaunchDarklyUtilsProjects</code>](#LaunchDarklyUtilsProjects) |
| 450 | +**Fulfil**: <code>Object</code> project object json |
| 451 | +**Reject**: <code>Error</code> object with message |
| 452 | + |
| 453 | +| Param | Type | Description | |
| 454 | +| --- | --- | --- | |
| 455 | +| projectName | <code>\*</code> | the name of the project | |
| 456 | +| projectKey | <code>\*</code> | the key that identifies the project | |
| 457 | +| includeInSnippetByDefault | <code>\*</code> | boolean true / false of whether should include a snippet | |
| 458 | +| tags | <code>\*</code> | arrays of tags that can be associated with the project | |
| 459 | +| environments | <code>\*</code> | an array of environments that are associated with the account | |
| 460 | +| defaultClientSideAvailability | <code>\*</code> | An object that defines wether the SDK and / or mobile flags are available | |
| 461 | + |
| 462 | +**Example** |
| 463 | +```js |
| 464 | +ldutils createProject new-project 'New Project' 'false' dev,Development,#41705:test,Test,f5a623 'true' 'false' marketing,online |
| 465 | +``` |
| 466 | +<a name="LaunchDarklyUtilsProjects+updateProject"></a> |
| 467 | + |
| 468 | +### launchDarklyUtilsProjects.updateProject(projectKey, jsonPatch) ⇒ <code>Promise</code> |
| 469 | +Patch a single project using jsonPatch notation |
| 470 | + |
| 471 | +**Kind**: instance method of [<code>LaunchDarklyUtilsProjects</code>](#LaunchDarklyUtilsProjects) |
| 472 | +**Fulfil**: <code>Object</code> an empty project |
| 473 | +**Reject**: <code>Error</code> object with message |
| 474 | + |
| 475 | +| Param | Type | Description | |
| 476 | +| --- | --- | --- | |
| 477 | +| projectKey | <code>\*</code> | projectKey a key that identifies the project | |
| 478 | +| jsonPatch | <code>\*</code> | an array of string using the JSON patch notation https://tools.ietf.org/html/rfc6902 | |
| 479 | + |
| 480 | +**Example** |
| 481 | +```js |
| 482 | +ldutils updateProject new-project [{ op: 'replace', path: '/name', value: 'New project name' }] |
| 483 | +``` |
| 484 | +<a name="LaunchDarklyUtilsProjects+deleteProject"></a> |
| 485 | + |
| 486 | +### launchDarklyUtilsProjects.deleteProject(projectKey) |
| 487 | +Delete a project |
| 488 | + |
| 489 | +**Kind**: instance method of [<code>LaunchDarklyUtilsProjects</code>](#LaunchDarklyUtilsProjects) |
| 490 | +**Fulfil**: <code>Object</code> an empty project |
| 491 | +**Reject**: <code>Error</code> object with message |
| 492 | + |
| 493 | +| Param | Type | Description | |
| 494 | +| --- | --- | --- | |
| 495 | +| projectKey | <code>\*</code> | projectKey a key that identifies the project | |
| 496 | + |
| 497 | +**Example** |
| 498 | +```js |
| 499 | +ldutils deleteProject new-project |
| 500 | +``` |
380 | 501 | <a name="LaunchDarklyUtilsRoles"></a> |
381 | 502 |
|
382 | 503 | ## LaunchDarklyUtilsRoles |
|
0 commit comments