@pdfbutler/migration-cli 0.0.19 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,8 +7,8 @@
7
7
  v0.0.11 updates: <br/>
8
8
 
9
9
  - '-b' flag disables backend export. If specified, the export operation doesn't use a PDF Butler backend process for exporting the configuration. By default, backend export is enabled.
10
- - New '-l --logs' flag. Use this flag to enable a more detailed log of the migration process.
11
- - New '-p --partial' flag. Use this flag to ignore invalid document configurations and allow the export of document configuration files with the backend part.
10
+ - '-l --logs' flag. Use this flag to enable a more detailed log of the migration process.
11
+ - '-p --partial' flag. Use this flag to ignore invalid document configurations and allow the export of document configuration files with the backend part.
12
12
 
13
13
  v0.0.14 updates: <br/>
14
14
 
@@ -18,6 +18,27 @@ v0.0.17 updates: <br/>
18
18
 
19
19
  - The '-c' or '--clone' flag has been added to the import command. Use '-c' or '--clone' to allow inserting new DocConfigs instead of updating existing ones.
20
20
 
21
+ v.0.0.18 updates: <br/>
22
+ This release introduces several new commands to enhance the management and deployment of PDFButler Packs and administrative settings in your org. Here’s a breakdown of the new commands and their functionality:
23
+
24
+ - 'exportpack'. Allows you to export a PDFButler Pack from the org to an external file.
25
+ - 'importpack'. Facilitates importing a previously exported PDFButler Pack into your org.
26
+ - 'adminsettings'. Allows you to configure critical PDFButler settings such as the service URL, region, and stage.
27
+ - 'admincredentials'. Enables you to securely provide or update the PDFButler admin credentials.
28
+
29
+ v.0.0.20 updates <br/>
30
+ This release introduces an alternative authentication method to enhance flexibility when connecting to Salesforce. The new functionality includes support for session-based authentication, allowing users to connect without relying solely on username.
31
+ Additionally, two new optional flags, --session and --instance, have been added to all commands to support this authentication method:
32
+
33
+ - '--session'. Allows you to provide a Salesforce Session Id for authentication.
34
+ - '--instance'. Specifies the Salesforce Instance URL for authentication.
35
+
36
+ - v.0.0.21 updates <br/>
37
+ This release introduces an alternative authentication method to enhance flexibility when connecting to Salesforce. The new functionality includes support for session-based authentication, allowing users to connect without relying solely on username.
38
+ Additionally, two new optional flags, --session and --instance, have been added to all commands to support this authentication method:
39
+
40
+ - '--cut'. Trim filenames to a maximum of 150 characters to prevent issues when extracting a zipped file on Windows, as Windows Explorer cannot support file paths longer than 255 characters.
41
+ - '--shortpaths'. The filename is just the DC name (drop the Stage and long DC Id in the filename).
21
42
  ## About
22
43
 
23
44
  @pdfbutler/migration-cli is a Salesforce plugin designed to simplify and automate the process of migrating configurations within the PDF Butler system in the Salesforce environment. PDF Butler is a powerful tool for generating and automating documents in the Salesforce platform, and the use of this CLI plugin allows users to easily manage configurations and transfer them between different Salesforce instances or projects.
@@ -67,11 +88,24 @@ One of the options to authorize an org is by running a CLI command and entering
67
88
  sf org login web
68
89
  ```
69
90
 
91
+ Alternatively, you can provide the --session and --instance flags directly during command execution to authenticate using a Salesforce Session ID and Instance URL. This method allows you to bypass the browser-based login and authenticate seamlessly:
92
+
93
+ ```
94
+ command ... --session "SessionId" --instance "https://yourInstance.sale
95
+ ```
96
+
97
+ Pay attention! <br/>
98
+ If you provide only the --target flag, authentication will occur using the specified target org credentials. However, if you also include the --session and --instance flags, these values will take precedence, and the authentication process will rely on the session-based method. This allows for a flexible authentication approach tailored to your needs.
99
+
70
100
  After the installation and authorization are complete, you can call this plugin by using its name in the terminal or command prompt to export and import PDF Butler configurations in Salesforce. For example:
71
101
 
72
102
  ```
73
103
  $ sf butler pb export [options]
74
104
  $ sf butler pb import [options]
105
+ $ sf butler pb exportpack [options]
106
+ $ sf butler pb importpack [options]
107
+ $ sf butler pb adminsettings [options]
108
+ $ sf butler pb admincredentials [options]
75
109
  ```
76
110
 
77
111
  ## Recommended CLI Shell:
@@ -92,12 +126,12 @@ Export PDF Butler configurations.
92
126
 
93
127
  ```
94
128
  USAGE
95
- $ sf butler pb export [--target | -t <value>] [--id | -i <value>] [--out | -o <value>] [--stage | -s <value>] [--auth-env-var | -a <value>] [--endpoint | -e <value>] [--backend | -b] [--unzip | -u] [-l | --logs] [-p | --partial]
129
+ $ sf butler pb export [--target | -t <value>] [--id | -i <value>] [--out | -o <value>] [--stage | -s <value>] [--auth-env-var | -a <value>] [--endpoint | -e <value>] [--backend | -b] [--unzip | -u] [-l | --logs] [-p | --partial] [--session <value>] [--instance <value>]
96
130
 
97
131
  FLAGS
98
132
  -t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
99
133
  -i, --id=<value> The ID of the PDF Butler document configuration to export.
100
- For bulk export, enter multiple docuemnt configuration IDs separated by whitespaces. (Required)
134
+ For bulk export, enter multiple docuemnt configuration IDs separated by Customer Pack Id. (Required)
101
135
  -o, --out=<value> The value specifies the path to the folder with the exported configuration and archive name. (Required)
102
136
  -s, --stage=<value> The CADMUS stage. (Required)
103
137
  -a, --auth-env-var=<value> The PDF Butler credentials for backend authentication. (Required)
@@ -112,6 +146,8 @@ FLAGS
112
146
  -b, --backend Use this flag to disable PDF Butler backend export. (Optional)
113
147
  -l, --logs Use it to get a more detailed log of migration process. (Optional)
114
148
  -p, --partial Use this flag to ignore invalid document configurations and allow the export of document configuration files with the backend part. (Optional)
149
+ --session=<value> This flag is used to provide a Salesforce Session ID for authentication.
150
+ --instance=<value> This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
115
151
 
116
152
  DESCRIPTION
117
153
  Export DocConfigs and related DataSource files from your organization.
@@ -128,7 +164,7 @@ DESCRIPTION
128
164
  get a more detailed log of migration process and even choose to unzip the exported configuration.
129
165
 
130
166
  EXAMPLES
131
- Run with --backend flag only
167
+ Run with --backend flag
132
168
 
133
169
  $ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
134
170
  -o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
@@ -164,7 +200,7 @@ EXAMPLES
164
200
  }
165
201
  }
166
202
 
167
- Run with --unzip flag only
203
+ Run with --unzip flag
168
204
 
169
205
  $ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
170
206
  -o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
@@ -208,7 +244,7 @@ EXAMPLES
208
244
  }
209
245
  }
210
246
 
211
- Run with --logs flag only
247
+ Run with --logs flag
212
248
 
213
249
  $ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
214
250
  -o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
@@ -257,29 +293,7 @@ EXAMPLES
257
293
  }
258
294
  }
259
295
 
260
- Run with --partial flag only and docconfig with backend part
261
-
262
- $ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
263
- -o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
264
- -a 'pdf_butler_user_name-ADMIN:admin_password' -p
265
-
266
- # Console output:
267
- Connected to sfusername@sandbox.com (00D06000001aXGkEAM) with API version 58.0
268
-
269
- # Created:
270
- Directory 'export_folder_name/archive_or_folder_name'{
271
- Directory 'sfdc'{
272
- file 'docconfig_id.json',
273
- },
274
- zip file'docconfig_id.zip'{
275
- Directory 'ConfigTypes',
276
- Directory 'DataSources',
277
- file 'doc-config.json',
278
- file 'TemplateName.docx'
279
- }
280
- }
281
-
282
- Run with --partial flag only (bulk export)
296
+ Run with --partial flag (bulk export)
283
297
 
284
298
  $ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id_1, invalid_document_configuration_id_2'
285
299
  -o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
@@ -310,94 +324,6 @@ EXAMPLES
310
324
  # Console output:
311
325
  Error (1): One or more docConfigs have no backend.
312
326
 
313
- Run without --partial flag (bulk export)
314
-
315
- $ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id_1, document_configuration_id_2'
316
- -o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
317
- -a 'pdf_butler_user_name-ADMIN:admin_password'
318
-
319
- # Created:
320
- Directory 'export_folder_name/archive_or_folder_name'{
321
- Directory 'sfdc'{
322
- file 'docconfig_id_1.json',
323
- file 'docconfig_id_2.json',
324
- },
325
- zip file'docconfig_id_1.zip'{
326
- Directory 'ConfigTypes',
327
- Directory 'DataSources',
328
- file 'doc-config.json',
329
- file 'TemplateName.docx'
330
- },
331
- zip file'docconfig_id_2.zip'{
332
- Directory 'ConfigTypes',
333
- Directory 'DataSources',
334
- file 'doc-config.json',
335
- file 'TemplateName.docx'
336
- }
337
- }
338
-
339
- Run with --backend flag and other optional flags
340
-
341
- $ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
342
- -o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
343
- -a 'pdf_butler_user_name-ADMIN:admin_password' -b [-u | -l | -p]
344
-
345
- # Console output:
346
- Connected to sfusername@sandbox.com (00D06000001aXGkEAM) with API version 58.0
347
-
348
- # Created:
349
- Directory 'export_folder_name/archive_or_folder_name/sfdc'{
350
- file 'docconfig_id_1.json'
351
- }
352
-
353
- Run with --unzip and --logs flags
354
-
355
- $ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
356
- -o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
357
- -a 'pdf_butler_user_name-ADMIN:admin_password' -u -l
358
-
359
- # Console output:
360
- Connected to sfusername@sandbox.com (00D06000001aXGkEAM) with API version 58.0
361
- DocConfig exported - 10061
362
- Exported data from backend - 71940
363
- Exported data from backend has been archived
364
- User has read/write permissions
365
- Archive unzipped and recorded locally
366
-
367
- # Created:
368
- Directory 'export_folder_name/archive_or_folder_name'{
369
- Directory 'sfdc'{
370
- file 'document_configuration_id.json',
371
- },
372
- Unziped directory 'document_configuration_id'{
373
- Directory 'ConfigTypes',
374
- Directory 'DataSources',
375
- file 'doc-config.json',
376
- file 'TemplateName.docx'
377
- }
378
- }
379
-
380
- Run without optional flags
381
-
382
- $ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
383
- -o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
384
- -a 'pdf_butler_user_name-ADMIN:admin_password'
385
-
386
- # Console output:
387
- Connected to sfusername@sandbox.com (00D06000001aXGkEAM) with API version 58.0
388
-
389
- # Created:
390
- Directory 'export_folder_name/archive_or_folder_name'{
391
- Directory 'sfdc'{
392
- file 'document_configuration_id.json',
393
- },
394
- zip file'document_configuration_id.zip'{
395
- Directory 'ConfigTypes',
396
- Directory 'DataSources',
397
- file 'doc-config.json',
398
- file 'TemplateName.docx'
399
- }
400
- }
401
327
 
402
328
  FLAG DESCRIPTIONS
403
329
  -t, --target <value>
@@ -439,6 +365,12 @@ FLAG DESCRIPTIONS
439
365
 
440
366
  -p, --partial
441
367
  Use this flag to ignore invalid document configurations and allow the export of document configuration files with the backend part.
368
+
369
+ --session
370
+ This flag is used to provide a Salesforce Session ID for authentication.
371
+
372
+ --instance
373
+ This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
442
374
  ```
443
375
 
444
376
  ## butler pb import
@@ -447,7 +379,7 @@ Import PDF Butler document configurations and related DataSource files.
447
379
 
448
380
  ```
449
381
  USAGE
450
- $ sf butler pb import [--target | -t <value>] [--id | -i <value>] [--auth-env-var | -a <value>] [--endpoint | -e <value>] [--stage | -s <value>] [--config | -f <value>] [-c | --clone]
382
+ $ sf butler pb import [--target | -t <value>] [--id | -i <value>] [--auth-env-var | -a <value>] [--endpoint | -e <value>] [--stage | -s <value>] [--config | -f <value>] [-c | --clone] [--session <value>] [--instance <value>]
451
383
 
452
384
  FLAGS
453
385
  -t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
@@ -465,6 +397,8 @@ FLAGS
465
397
  -f, --config=<value> The path to the directory containing configurations to import. (Required)
466
398
  -l, --logs Use it to get a more detailed log of migration process. (Optional)
467
399
  -c, --clone Use this flag to disables the update of existing docconfigs and allows to create new ones. (Optional)
400
+ --session=<value> This flag is used to provide a Salesforce Session ID for authentication.
401
+ --instance=<value> This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
468
402
 
469
403
  DESCRIPTION
470
404
  Import DocConfigs and related DataSource files into your organization.
@@ -531,6 +465,318 @@ FLAG DESCRIPTIONS
531
465
 
532
466
  -c, --clone
533
467
  Use this flag to disables the update of existing docconfigs and allows to create new ones. (Optional)
468
+
469
+ --session
470
+ This flag is used to provide a Salesforce Session ID for authentication.
471
+
472
+ --instance
473
+ This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
474
+ ```
475
+
476
+ ## butler pb exportpack
477
+
478
+ <span style="color: red;">Important!</span> Make sure you have installed PDF Butler version equal or higher than v1.440. <br/>
479
+
480
+ Export PDF Butler Pack.
481
+
482
+ ```
483
+ USAGE
484
+ $ sf butler pb exportpack [--target | -t <value>] [--pack | -p <value>] [--out | -o <value>] [--logs | -l] [--session <value>] [--instance <value>]
485
+
486
+ FLAGS
487
+ -t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
488
+ -p, --pack=<value> The Customer Pack Id of the PDF Butler Pack to export.
489
+ For bulk export, enter multiple Customer Pack Ids separated by commas. (Required)
490
+ -o, --out=<value> The value specifies the path to the folder with the exported configuration and archive name. (Required)
491
+ -l, --logs Use it to get a more detailed log of migration process. (Optional)
492
+ --session=<value> This flag is used to provide a Salesforce Session ID for authentication.
493
+ --instance=<value> This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
494
+
495
+ DESCRIPTION
496
+ Export PDFButler Pack with related DocConfig, DataSources and Actionables from your organization.
497
+
498
+ You must run this command from the termianl.
499
+
500
+ By default, all your exported data is stored in a json file.
501
+
502
+ To initiate an export, ensure you specify the necessary parameters, including the target org, Customer Pack Id and output path.
503
+
504
+ EXAMPLES
505
+ Export single pack:
506
+
507
+ $ sf butler pb exportpack -t sfusername@sandbox.com -p 'customer_pack_id'
508
+ -o 'export_folder_name/folder_name' -l
509
+
510
+ # Console output:
511
+ [INFO] Username: "sfusername@sandbox.com"
512
+ [INFO] Packs to retrieve: "customer_pack_id"
513
+ [INFO] Directory to output: "export_folder_name/folder_name"
514
+ [INFO] Try to connect to the org
515
+ [INFO] Connected to sfusername@sandbox.com (session_id) with API version 62.0
516
+ [INFO] Try to export pack by Id: customer_pack_id
517
+ [INFO] Calling the service...
518
+ [INFO] Saving to the directory
519
+ [INFO] Directory hierarchy: ./export_folder_name/folder_name/sfdc
520
+ [INFO] File path: ./export_folder_name/folder_name/sfdc/customer_pack_id.json
521
+ [INFO] Data successfully written to ./export_folder_name/folder_name/sfdc/customer_pack_id.json
522
+
523
+ # Created:
524
+ Directory 'export_folder_name/folder_name/sfdc'{
525
+ file 'customer_pack_id.json'
526
+ }
527
+
528
+ Export multiple packs:
529
+
530
+ $ sf butler pb exportpack -t sfusername@sandbox.com -p 'customer_pack_id1, customer_pack_id2'
531
+ -o 'export_folder_name/folder_name' -l
532
+
533
+ # Console output:
534
+ [INFO] Username: "sfusername@sandbox.com"
535
+ [INFO] Packs to retrieve: "customer_pack_id1, customer_pack_id12"
536
+ [INFO] Directory to output: "export_folder_name/folder_name"
537
+ [INFO] Try to connect to the org
538
+ [INFO] Connected to sfusername@sandbox.com (session_id) with API version 62.0
539
+ [INFO] Try to export pack by Id: customer_pack_id1
540
+ [INFO] Calling the service.
541
+ [INFO] Saving to the directory
542
+ [INFO] Directory hierarchy: ./export_folder_name/folder_name/sfdc
543
+ [INFO] File path: ./export_folder_name/folder_name/sfdc/customer_pack_id1.json
544
+ [INFO] Data successfully written to ./export_folder_name/folder_name/sfdc/customer_pack_id1.json
545
+ [INFO] Try to export pack by Id: customer_pack_id12
546
+ [INFO] Calling the service.
547
+ [INFO] Saving to the directory
548
+ [INFO] Directory hierarchy: ./export_folder_name/folder_name/sfdc
549
+ [INFO] File path: ./export_folder_name/folder_name/sfdc/customer_pack_id12.json
550
+ [INFO] Data successfully written to ./ -/sfdc/customer_pack_id12.json
551
+
552
+ # Created:
553
+ Directory 'export_folder_name/folder_name/sfdc'{
554
+ file 'customer_pack_id1.json'
555
+ file 'customer_pack_id2.json'
556
+ }
557
+
558
+ FLAG DESCRIPTIONS
559
+ -t, --target <value>
560
+ Specifies the Salesforce org username credentials to connect to the target
561
+ org from where the PDF Butler packs will be exported. This flag is required for authentication.
562
+
563
+ -p, --pack <value>
564
+ Specifies the Customer Pack Id of the PDF Butler Pack to be exported.
565
+ This ID uniquely identifies the pack you want to export. It is a required parameter.
566
+
567
+ -o, --out <value>
568
+ Specifies the path to the directory where to export packs. This flag is required.
569
+
570
+ -l, --logs
571
+ Use it to get a more detailed log of migration process.
572
+
573
+ --session
574
+ This flag is used to provide a Salesforce Session ID for authentication.
575
+
576
+ --instance
577
+ This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
578
+ ```
579
+
580
+ ## butler pb importpack
581
+
582
+ <span style="color: red;">Important!</span> Make sure you have installed PDF Butler version equal or higher than v1.440. <br/>
583
+
584
+ Import PDF Butler Pack.
585
+
586
+ ```
587
+ USAGE
588
+ $ sf butler pb importpack [--target | -t <value>] [--pack | -p <value>] [--folder | -f <value>] [-logs | -l] [--session <value>] [--instance <value>]
589
+
590
+ FLAGS
591
+ -t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
592
+ -p, --pack=<value> The Customer Pack Id of the PDF Butler Pack to export.
593
+ For bulk export, enter multiple Customer Pack Ids separated by commas. (Required)
594
+ -f, --folder=<value> The value specifies the path to the folder with the exported packs. (Required)
595
+ -l, --logs Use it to get a more detailed log of migration process. (Optional)
596
+ --session=<value> This flag is used to provide a Salesforce Session ID for authentication.
597
+ --instance=<value> This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
598
+
599
+ DESCRIPTION
600
+ Import PDFButler Pack with related DocConfig, DataSources and Actionables into your organization.
601
+
602
+ You must run this command from the termianl.
603
+
604
+ To initiate an import, ensure you specify the necessary parameters, including the target org, Customer Pack Id and folder path.
605
+
606
+ EXAMPLES
607
+ import single pack:
608
+
609
+ $ sf butler pb importpack -t sfusername@sandbox.com -p 'customer_pack_id'
610
+ -f 'export_folder_name/folder_name/sfdc' -l
611
+
612
+ # Console output:
613
+ [INFO] Username: "sfusername@sandbox.com"
614
+ [INFO] Packs to import: "customer_pack_id1"
615
+ [INFO] Folder to retrieve: "export_folder_name/folder_name/sfdc"
616
+ [INFO] Try to connect to the org
617
+ [INFO] Connected to sfusername@sandbox.com (session_id) with API version 62.0
618
+ [INFO] Retrieving items from the directory
619
+ [INFO] Files found in folder: 1
620
+ [INFO] Successfully imported export_folder_name/folder_name/sfdc/customer_pack_id1.json
621
+
622
+ Import multiple packs:
623
+
624
+ $ sf butler pb importpack -t sfusername@sandbox.com -p 'customer_pack_id1, customer_pack_id2'
625
+ -f 'export_folder_name/folder_name' -l
626
+
627
+ # Console output:
628
+ [INFO] Username: "sfusername@sandbox.com"
629
+ [INFO] Packs to import: "customer_pack_id1, customer_pack_id2"
630
+ [INFO] Folder to retrieve: "export_folder_name/folder_name/sfdc"
631
+ [INFO] Try to connect to the org
632
+ [INFO] Connected to sfusername@sandbox.com (session_id) with API version 62.0
633
+ [INFO] Retrieving items from the directory
634
+ [INFO] Files found in folder: 2
635
+ [INFO] Successfully imported export_folder_name/folder_name/sfdc/customer_pack_id1.json
636
+ [INFO] Successfully imported export_folder_name/folder_name/sfdc/customer_pack_id2.json
637
+
638
+ FLAG DESCRIPTIONS
639
+ -t, --target <value>
640
+ Specifies the Salesforce org username credentials to connect to the target
641
+ org where the PDF Butler packs will be imported. This flag is required for authentication.
642
+
643
+ -p, --pack <value>
644
+ Specifies the unique Customer Pack Id of the PDF Butler Pack to be imported.
645
+ This ID uniquely identifies the packs you want to import. It is a required parameter.
646
+
647
+ -f, --folder <value>
648
+ Specifies the path to the directory containing packs to import.
649
+ This flag is required to determine which paksc to import.
650
+
651
+ -l, --logs
652
+ Use it to get a more detailed log of migration process.
653
+
654
+ --session
655
+ This flag is used to provide a Salesforce Session ID for authentication.
656
+
657
+ --instance
658
+ This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
659
+ ```
660
+
661
+ ## butler pb adminsettings
662
+
663
+ <span style="color: red;">Important!</span> Make sure you have installed PDF Butler version equal or higher than v1.440. <br/>
664
+
665
+ Provide PDF Butler App Settings.
666
+
667
+ ```
668
+ USAGE
669
+ $ sf butler pb adminsettings [--target | -t <value>] [--url | -u <value>] [--region | -r <value>] [--stage | -s <value>] [--session <value>] [--instance <value>]
670
+
671
+ FLAGS
672
+ -t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
673
+ -u, --url=<value> The Cadmus Endpoint to set. (Required)
674
+ -r, --region=<value> The value specifies the region of PDF Butler account. (Required)
675
+ -s, --stage=<value> The value specifies the stage of the organisation. (Required)
676
+ --session=<value> This flag is used to provide a Salesforce Session ID for authentication.
677
+ --instance=<value> This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
678
+
679
+ DESCRIPTION
680
+ Allows you to configure critical PDFButler settings such as the service URL, region, and stage.
681
+
682
+ You must run this command from the termianl.
683
+
684
+ EXAMPLES
685
+ Set settings:
686
+
687
+ $ sf butler pb adminsettings -t sfusername@sandbox.com -u 'https://us1.pdfbutler.com'
688
+ -r 'LOCAL' -s 'TEST'
689
+
690
+ # Console output:
691
+ [INFO] Authenticating user: sfusername@sandbox.com
692
+ [INFO] Connected to sfusername@sandbox.com (Org ID: org_id)
693
+ [INFO] Sending data to ***:
694
+ {
695
+ "url":"https://us1.pdfbutler.com/",
696
+ "region":"LOCAL",
697
+ "stage":"TEST"
698
+ }
699
+ [INFO] Successfully imported settings.
700
+
701
+ FLAG DESCRIPTIONS
702
+ -t, --target <value>
703
+ Specifies the Salesforce org username credentials to connect to the target
704
+ org where the settings will be setuped. This flag is required for authentication.
705
+
706
+ -u, --url <value>
707
+ The base URL for the PDFButler service.
708
+
709
+ -r, --region <value>
710
+ Specifies the geographic region for the service (e.g., EU, US).
711
+
712
+ -s, --stage <value>
713
+ The deployment stage (e.g., dev, staging, production).
714
+
715
+ --session
716
+ This flag is used to provide a Salesforce Session ID for authentication.
717
+
718
+ --instance
719
+ This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
720
+ ```
721
+
722
+ ## butler pb admincredentials
723
+
724
+ <span style="color: red;">Important!</span> Make sure you have installed PDF Butler version equal or higher than v1.440. <br/>
725
+
726
+ Setup the PDF Butler Admin Credentials.
727
+
728
+ ```
729
+ USAGE
730
+ $ sf butler pb admincredentials [--target | -t <value>] [--username | -u <value>] [--password | -p <value>] [--user-password <value>] [--session <value>] [--instance <value>]
731
+
732
+ FLAGS
733
+ -t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
734
+ -u, --username=<value> The admin username for PDFButler. (Required)
735
+ -p, --password=<value> The admin password for PDFButler. (Required)
736
+ --user-password=<value> The user password for PDFButler. (Required)
737
+ --session=<value> This flag is used to provide a Salesforce Session ID for authentication.
738
+ --instance=<value> This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
739
+
740
+ DESCRIPTION
741
+ Enables you to securely provide or update the PDFButler admin credentials.
742
+
743
+ You must run this command from the termianl.
744
+
745
+ EXAMPLES
746
+ Set settings:
747
+
748
+ $ sf butler pb admincredentials -t sfusername@sandbox.com -u 'username'
749
+ -p 'ADMIN_password' --user-password 'USER_password' -l
750
+
751
+ # Console output:
752
+ [INFO] Authenticating user: sfusername@sandbox.com
753
+ [INFO] Connected to sfusername@sandbox.com (Org ID: org_id)
754
+ [INFO] Sending data to endpoint: {
755
+ "username": "sfusername@sandbox.com",
756
+ "password": "ADMIN_password",
757
+ "userPassword": "USER_password"
758
+ }
759
+ [INFO] Successfully imported user credentials.
760
+
761
+ FLAG DESCRIPTIONS
762
+ -t, --target <value>
763
+ Specifies the Salesforce org username credentials to connect to the target
764
+ org where the settings will be setuped. This flag is required for authentication.
765
+
766
+ -u, --username <value>
767
+ The admin username for PDFButler
768
+
769
+ -p, --password <value>
770
+ The admin password for PDFButler.
771
+
772
+ --user-password <value>
773
+ The user password for PDFButler.
774
+
775
+ --session
776
+ This flag is used to provide a Salesforce Session ID for authentication.
777
+
778
+ --instance
779
+ This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
534
780
  ```
535
781
 
536
782
  ## Typical errors and solutions
@@ -0,0 +1,24 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ export type ButlerPbAdmincredentialsResult = {
3
+ success: boolean;
4
+ };
5
+ export default class ButlerPbAdmincredentials extends SfCommand<ButlerPbAdmincredentialsResult> {
6
+ static readonly summary: string;
7
+ static readonly description: string;
8
+ static readonly examples: string[];
9
+ static readonly flags: {
10
+ name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
+ target: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
+ username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
13
+ password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
14
+ 'user-password': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
15
+ session: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
16
+ instance: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
17
+ };
18
+ private static log;
19
+ private static isBlank;
20
+ private static authenticateWithTarget;
21
+ private static authenticateWitsSession;
22
+ private static authenticate;
23
+ run(): Promise<ButlerPbAdmincredentialsResult>;
24
+ }