@pdfbutler/migration-cli 0.0.18 → 0.0.20
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 +358 -119
- package/lib/commands/butler/pb/admincredentials.d.ts +24 -0
- package/lib/commands/butler/pb/admincredentials.js +160 -0
- package/lib/commands/butler/pb/admincredentials.js.map +1 -0
- package/lib/commands/butler/pb/adminsettings.d.ts +24 -0
- package/lib/commands/butler/pb/adminsettings.js +155 -0
- package/lib/commands/butler/pb/adminsettings.js.map +1 -0
- package/lib/commands/butler/pb/export.d.ts +11 -1
- package/lib/commands/butler/pb/export.js +169 -43
- package/lib/commands/butler/pb/export.js.map +1 -1
- package/lib/commands/butler/pb/exportpack.d.ts +27 -0
- package/lib/commands/butler/pb/exportpack.js +213 -0
- package/lib/commands/butler/pb/exportpack.js.map +1 -0
- package/lib/commands/butler/pb/import.d.ts +9 -1
- package/lib/commands/butler/pb/import.js +91 -10
- package/lib/commands/butler/pb/import.js.map +1 -1
- package/lib/commands/butler/pb/importpack.d.ts +27 -0
- package/lib/commands/butler/pb/importpack.js +226 -0
- package/lib/commands/butler/pb/importpack.js.map +1 -0
- package/messages/butler.pb.admincredentials.md +44 -0
- package/messages/butler.pb.adminsettings.md +44 -0
- package/messages/butler.pb.export.md +12 -0
- package/messages/butler.pb.exportpack.md +44 -0
- package/messages/butler.pb.import.md +8 -0
- package/messages/butler.pb.importpack.md +44 -0
- package/oclif.manifest.json +332 -5
- package/package.json +3 -3
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
|
-
-
|
|
11
|
-
-
|
|
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,20 @@ 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.
|
|
21
35
|
## About
|
|
22
36
|
|
|
23
37
|
@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 +81,24 @@ One of the options to authorize an org is by running a CLI command and entering
|
|
|
67
81
|
sf org login web
|
|
68
82
|
```
|
|
69
83
|
|
|
84
|
+
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:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
command ... --session "SessionId" --instance "https://yourInstance.sale
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Pay attention! <br/>
|
|
91
|
+
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.
|
|
92
|
+
|
|
70
93
|
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
94
|
|
|
72
95
|
```
|
|
73
96
|
$ sf butler pb export [options]
|
|
74
97
|
$ sf butler pb import [options]
|
|
98
|
+
$ sf butler pb exportpack [options]
|
|
99
|
+
$ sf butler pb importpack [options]
|
|
100
|
+
$ sf butler pb adminsettings [options]
|
|
101
|
+
$ sf butler pb admincredentials [options]
|
|
75
102
|
```
|
|
76
103
|
|
|
77
104
|
## Recommended CLI Shell:
|
|
@@ -92,12 +119,12 @@ Export PDF Butler configurations.
|
|
|
92
119
|
|
|
93
120
|
```
|
|
94
121
|
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]
|
|
122
|
+
$ 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
123
|
|
|
97
124
|
FLAGS
|
|
98
125
|
-t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
|
|
99
126
|
-i, --id=<value> The ID of the PDF Butler document configuration to export.
|
|
100
|
-
For bulk export, enter multiple docuemnt configuration IDs separated by
|
|
127
|
+
For bulk export, enter multiple docuemnt configuration IDs separated by Customer Pack Id. (Required)
|
|
101
128
|
-o, --out=<value> The value specifies the path to the folder with the exported configuration and archive name. (Required)
|
|
102
129
|
-s, --stage=<value> The CADMUS stage. (Required)
|
|
103
130
|
-a, --auth-env-var=<value> The PDF Butler credentials for backend authentication. (Required)
|
|
@@ -112,6 +139,8 @@ FLAGS
|
|
|
112
139
|
-b, --backend Use this flag to disable PDF Butler backend export. (Optional)
|
|
113
140
|
-l, --logs Use it to get a more detailed log of migration process. (Optional)
|
|
114
141
|
-p, --partial Use this flag to ignore invalid document configurations and allow the export of document configuration files with the backend part. (Optional)
|
|
142
|
+
--session=<value> This flag is used to provide a Salesforce Session ID for authentication.
|
|
143
|
+
--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
144
|
|
|
116
145
|
DESCRIPTION
|
|
117
146
|
Export DocConfigs and related DataSource files from your organization.
|
|
@@ -128,7 +157,7 @@ DESCRIPTION
|
|
|
128
157
|
get a more detailed log of migration process and even choose to unzip the exported configuration.
|
|
129
158
|
|
|
130
159
|
EXAMPLES
|
|
131
|
-
Run with --backend flag
|
|
160
|
+
Run with --backend flag
|
|
132
161
|
|
|
133
162
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
|
|
134
163
|
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
@@ -164,7 +193,7 @@ EXAMPLES
|
|
|
164
193
|
}
|
|
165
194
|
}
|
|
166
195
|
|
|
167
|
-
Run with --unzip flag
|
|
196
|
+
Run with --unzip flag
|
|
168
197
|
|
|
169
198
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
|
|
170
199
|
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
@@ -208,7 +237,7 @@ EXAMPLES
|
|
|
208
237
|
}
|
|
209
238
|
}
|
|
210
239
|
|
|
211
|
-
Run with --logs flag
|
|
240
|
+
Run with --logs flag
|
|
212
241
|
|
|
213
242
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id'
|
|
214
243
|
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
@@ -257,29 +286,7 @@ EXAMPLES
|
|
|
257
286
|
}
|
|
258
287
|
}
|
|
259
288
|
|
|
260
|
-
Run with --partial flag
|
|
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)
|
|
289
|
+
Run with --partial flag (bulk export)
|
|
283
290
|
|
|
284
291
|
$ sf butler pb export -t sfusername@sandbox.com -i 'document_configuration_id_1, invalid_document_configuration_id_2'
|
|
285
292
|
-o 'export_folder_name/archive_or_folder_name' -s 'TEST' -e 'https://eu1.pdfbutler.com'
|
|
@@ -310,94 +317,6 @@ EXAMPLES
|
|
|
310
317
|
# Console output:
|
|
311
318
|
Error (1): One or more docConfigs have no backend.
|
|
312
319
|
|
|
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
320
|
|
|
402
321
|
FLAG DESCRIPTIONS
|
|
403
322
|
-t, --target <value>
|
|
@@ -439,6 +358,12 @@ FLAG DESCRIPTIONS
|
|
|
439
358
|
|
|
440
359
|
-p, --partial
|
|
441
360
|
Use this flag to ignore invalid document configurations and allow the export of document configuration files with the backend part.
|
|
361
|
+
|
|
362
|
+
--session
|
|
363
|
+
This flag is used to provide a Salesforce Session ID for authentication.
|
|
364
|
+
|
|
365
|
+
--instance
|
|
366
|
+
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
367
|
```
|
|
443
368
|
|
|
444
369
|
## butler pb import
|
|
@@ -447,7 +372,7 @@ Import PDF Butler document configurations and related DataSource files.
|
|
|
447
372
|
|
|
448
373
|
```
|
|
449
374
|
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]
|
|
375
|
+
$ 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
376
|
|
|
452
377
|
FLAGS
|
|
453
378
|
-t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
|
|
@@ -465,6 +390,8 @@ FLAGS
|
|
|
465
390
|
-f, --config=<value> The path to the directory containing configurations to import. (Required)
|
|
466
391
|
-l, --logs Use it to get a more detailed log of migration process. (Optional)
|
|
467
392
|
-c, --clone Use this flag to disables the update of existing docconfigs and allows to create new ones. (Optional)
|
|
393
|
+
--session=<value> This flag is used to provide a Salesforce Session ID for authentication.
|
|
394
|
+
--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
395
|
|
|
469
396
|
DESCRIPTION
|
|
470
397
|
Import DocConfigs and related DataSource files into your organization.
|
|
@@ -531,6 +458,318 @@ FLAG DESCRIPTIONS
|
|
|
531
458
|
|
|
532
459
|
-c, --clone
|
|
533
460
|
Use this flag to disables the update of existing docconfigs and allows to create new ones. (Optional)
|
|
461
|
+
|
|
462
|
+
--session
|
|
463
|
+
This flag is used to provide a Salesforce Session ID for authentication.
|
|
464
|
+
|
|
465
|
+
--instance
|
|
466
|
+
This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
## butler pb exportpack
|
|
470
|
+
|
|
471
|
+
<span style="color: red;">Important!</span> Make sure you have installed PDF Butler version equal or higher than v1.440. <br/>
|
|
472
|
+
|
|
473
|
+
Export PDF Butler Pack.
|
|
474
|
+
|
|
475
|
+
```
|
|
476
|
+
USAGE
|
|
477
|
+
$ sf butler pb exportpack [--target | -t <value>] [--pack | -p <value>] [--out | -o <value>] [--logs | -l] [--session <value>] [--instance <value>]
|
|
478
|
+
|
|
479
|
+
FLAGS
|
|
480
|
+
-t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
|
|
481
|
+
-p, --pack=<value> The Customer Pack Id of the PDF Butler Pack to export.
|
|
482
|
+
For bulk export, enter multiple Customer Pack Ids separated by commas. (Required)
|
|
483
|
+
-o, --out=<value> The value specifies the path to the folder with the exported configuration and archive name. (Required)
|
|
484
|
+
-l, --logs Use it to get a more detailed log of migration process. (Optional)
|
|
485
|
+
--session=<value> This flag is used to provide a Salesforce Session ID for authentication.
|
|
486
|
+
--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.
|
|
487
|
+
|
|
488
|
+
DESCRIPTION
|
|
489
|
+
Export PDFButler Pack with related DocConfig, DataSources and Actionables from your organization.
|
|
490
|
+
|
|
491
|
+
You must run this command from the termianl.
|
|
492
|
+
|
|
493
|
+
By default, all your exported data is stored in a json file.
|
|
494
|
+
|
|
495
|
+
To initiate an export, ensure you specify the necessary parameters, including the target org, Customer Pack Id and output path.
|
|
496
|
+
|
|
497
|
+
EXAMPLES
|
|
498
|
+
Export single pack:
|
|
499
|
+
|
|
500
|
+
$ sf butler pb exportpack -t sfusername@sandbox.com -p 'customer_pack_id'
|
|
501
|
+
-o 'export_folder_name/folder_name' -l
|
|
502
|
+
|
|
503
|
+
# Console output:
|
|
504
|
+
[INFO] Username: "sfusername@sandbox.com"
|
|
505
|
+
[INFO] Packs to retrieve: "customer_pack_id"
|
|
506
|
+
[INFO] Directory to output: "export_folder_name/folder_name"
|
|
507
|
+
[INFO] Try to connect to the org
|
|
508
|
+
[INFO] Connected to sfusername@sandbox.com (session_id) with API version 62.0
|
|
509
|
+
[INFO] Try to export pack by Id: customer_pack_id
|
|
510
|
+
[INFO] Calling the service...
|
|
511
|
+
[INFO] Saving to the directory
|
|
512
|
+
[INFO] Directory hierarchy: ./export_folder_name/folder_name/sfdc
|
|
513
|
+
[INFO] File path: ./export_folder_name/folder_name/sfdc/customer_pack_id.json
|
|
514
|
+
[INFO] Data successfully written to ./export_folder_name/folder_name/sfdc/customer_pack_id.json
|
|
515
|
+
|
|
516
|
+
# Created:
|
|
517
|
+
Directory 'export_folder_name/folder_name/sfdc'{
|
|
518
|
+
file 'customer_pack_id.json'
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
Export multiple packs:
|
|
522
|
+
|
|
523
|
+
$ sf butler pb exportpack -t sfusername@sandbox.com -p 'customer_pack_id1, customer_pack_id2'
|
|
524
|
+
-o 'export_folder_name/folder_name' -l
|
|
525
|
+
|
|
526
|
+
# Console output:
|
|
527
|
+
[INFO] Username: "sfusername@sandbox.com"
|
|
528
|
+
[INFO] Packs to retrieve: "customer_pack_id1, customer_pack_id12"
|
|
529
|
+
[INFO] Directory to output: "export_folder_name/folder_name"
|
|
530
|
+
[INFO] Try to connect to the org
|
|
531
|
+
[INFO] Connected to sfusername@sandbox.com (session_id) with API version 62.0
|
|
532
|
+
[INFO] Try to export pack by Id: customer_pack_id1
|
|
533
|
+
[INFO] Calling the service.
|
|
534
|
+
[INFO] Saving to the directory
|
|
535
|
+
[INFO] Directory hierarchy: ./export_folder_name/folder_name/sfdc
|
|
536
|
+
[INFO] File path: ./export_folder_name/folder_name/sfdc/customer_pack_id1.json
|
|
537
|
+
[INFO] Data successfully written to ./export_folder_name/folder_name/sfdc/customer_pack_id1.json
|
|
538
|
+
[INFO] Try to export pack by Id: customer_pack_id12
|
|
539
|
+
[INFO] Calling the service.
|
|
540
|
+
[INFO] Saving to the directory
|
|
541
|
+
[INFO] Directory hierarchy: ./export_folder_name/folder_name/sfdc
|
|
542
|
+
[INFO] File path: ./export_folder_name/folder_name/sfdc/customer_pack_id12.json
|
|
543
|
+
[INFO] Data successfully written to ./ -/sfdc/customer_pack_id12.json
|
|
544
|
+
|
|
545
|
+
# Created:
|
|
546
|
+
Directory 'export_folder_name/folder_name/sfdc'{
|
|
547
|
+
file 'customer_pack_id1.json'
|
|
548
|
+
file 'customer_pack_id2.json'
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
FLAG DESCRIPTIONS
|
|
552
|
+
-t, --target <value>
|
|
553
|
+
Specifies the Salesforce org username credentials to connect to the target
|
|
554
|
+
org from where the PDF Butler packs will be exported. This flag is required for authentication.
|
|
555
|
+
|
|
556
|
+
-p, --pack <value>
|
|
557
|
+
Specifies the Customer Pack Id of the PDF Butler Pack to be exported.
|
|
558
|
+
This ID uniquely identifies the pack you want to export. It is a required parameter.
|
|
559
|
+
|
|
560
|
+
-o, --out <value>
|
|
561
|
+
Specifies the path to the directory where to export packs. This flag is required.
|
|
562
|
+
|
|
563
|
+
-l, --logs
|
|
564
|
+
Use it to get a more detailed log of migration process.
|
|
565
|
+
|
|
566
|
+
--session
|
|
567
|
+
This flag is used to provide a Salesforce Session ID for authentication.
|
|
568
|
+
|
|
569
|
+
--instance
|
|
570
|
+
This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
## butler pb importpack
|
|
574
|
+
|
|
575
|
+
<span style="color: red;">Important!</span> Make sure you have installed PDF Butler version equal or higher than v1.440. <br/>
|
|
576
|
+
|
|
577
|
+
Import PDF Butler Pack.
|
|
578
|
+
|
|
579
|
+
```
|
|
580
|
+
USAGE
|
|
581
|
+
$ sf butler pb importpack [--target | -t <value>] [--pack | -p <value>] [--folder | -f <value>] [-logs | -l] [--session <value>] [--instance <value>]
|
|
582
|
+
|
|
583
|
+
FLAGS
|
|
584
|
+
-t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
|
|
585
|
+
-p, --pack=<value> The Customer Pack Id of the PDF Butler Pack to export.
|
|
586
|
+
For bulk export, enter multiple Customer Pack Ids separated by commas. (Required)
|
|
587
|
+
-f, --folder=<value> The value specifies the path to the folder with the exported packs. (Required)
|
|
588
|
+
-l, --logs Use it to get a more detailed log of migration process. (Optional)
|
|
589
|
+
--session=<value> This flag is used to provide a Salesforce Session ID for authentication.
|
|
590
|
+
--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.
|
|
591
|
+
|
|
592
|
+
DESCRIPTION
|
|
593
|
+
Import PDFButler Pack with related DocConfig, DataSources and Actionables into your organization.
|
|
594
|
+
|
|
595
|
+
You must run this command from the termianl.
|
|
596
|
+
|
|
597
|
+
To initiate an import, ensure you specify the necessary parameters, including the target org, Customer Pack Id and folder path.
|
|
598
|
+
|
|
599
|
+
EXAMPLES
|
|
600
|
+
import single pack:
|
|
601
|
+
|
|
602
|
+
$ sf butler pb importpack -t sfusername@sandbox.com -p 'customer_pack_id'
|
|
603
|
+
-f 'export_folder_name/folder_name/sfdc' -l
|
|
604
|
+
|
|
605
|
+
# Console output:
|
|
606
|
+
[INFO] Username: "sfusername@sandbox.com"
|
|
607
|
+
[INFO] Packs to import: "customer_pack_id1"
|
|
608
|
+
[INFO] Folder to retrieve: "export_folder_name/folder_name/sfdc"
|
|
609
|
+
[INFO] Try to connect to the org
|
|
610
|
+
[INFO] Connected to sfusername@sandbox.com (session_id) with API version 62.0
|
|
611
|
+
[INFO] Retrieving items from the directory
|
|
612
|
+
[INFO] Files found in folder: 1
|
|
613
|
+
[INFO] Successfully imported export_folder_name/folder_name/sfdc/customer_pack_id1.json
|
|
614
|
+
|
|
615
|
+
Import multiple packs:
|
|
616
|
+
|
|
617
|
+
$ sf butler pb importpack -t sfusername@sandbox.com -p 'customer_pack_id1, customer_pack_id2'
|
|
618
|
+
-f 'export_folder_name/folder_name' -l
|
|
619
|
+
|
|
620
|
+
# Console output:
|
|
621
|
+
[INFO] Username: "sfusername@sandbox.com"
|
|
622
|
+
[INFO] Packs to import: "customer_pack_id1, customer_pack_id2"
|
|
623
|
+
[INFO] Folder to retrieve: "export_folder_name/folder_name/sfdc"
|
|
624
|
+
[INFO] Try to connect to the org
|
|
625
|
+
[INFO] Connected to sfusername@sandbox.com (session_id) with API version 62.0
|
|
626
|
+
[INFO] Retrieving items from the directory
|
|
627
|
+
[INFO] Files found in folder: 2
|
|
628
|
+
[INFO] Successfully imported export_folder_name/folder_name/sfdc/customer_pack_id1.json
|
|
629
|
+
[INFO] Successfully imported export_folder_name/folder_name/sfdc/customer_pack_id2.json
|
|
630
|
+
|
|
631
|
+
FLAG DESCRIPTIONS
|
|
632
|
+
-t, --target <value>
|
|
633
|
+
Specifies the Salesforce org username credentials to connect to the target
|
|
634
|
+
org where the PDF Butler packs will be imported. This flag is required for authentication.
|
|
635
|
+
|
|
636
|
+
-p, --pack <value>
|
|
637
|
+
Specifies the unique Customer Pack Id of the PDF Butler Pack to be imported.
|
|
638
|
+
This ID uniquely identifies the packs you want to import. It is a required parameter.
|
|
639
|
+
|
|
640
|
+
-f, --folder <value>
|
|
641
|
+
Specifies the path to the directory containing packs to import.
|
|
642
|
+
This flag is required to determine which paksc to import.
|
|
643
|
+
|
|
644
|
+
-l, --logs
|
|
645
|
+
Use it to get a more detailed log of migration process.
|
|
646
|
+
|
|
647
|
+
--session
|
|
648
|
+
This flag is used to provide a Salesforce Session ID for authentication.
|
|
649
|
+
|
|
650
|
+
--instance
|
|
651
|
+
This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
## butler pb adminsettings
|
|
655
|
+
|
|
656
|
+
<span style="color: red;">Important!</span> Make sure you have installed PDF Butler version equal or higher than v1.440. <br/>
|
|
657
|
+
|
|
658
|
+
Provide PDF Butler App Settings.
|
|
659
|
+
|
|
660
|
+
```
|
|
661
|
+
USAGE
|
|
662
|
+
$ sf butler pb adminsettings [--target | -t <value>] [--url | -u <value>] [--region | -r <value>] [--stage | -s <value>] [--session <value>] [--instance <value>]
|
|
663
|
+
|
|
664
|
+
FLAGS
|
|
665
|
+
-t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
|
|
666
|
+
-u, --url=<value> The Cadmus Endpoint to set. (Required)
|
|
667
|
+
-r, --region=<value> The value specifies the region of PDF Butler account. (Required)
|
|
668
|
+
-s, --stage=<value> The value specifies the stage of the organisation. (Required)
|
|
669
|
+
--session=<value> This flag is used to provide a Salesforce Session ID for authentication.
|
|
670
|
+
--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.
|
|
671
|
+
|
|
672
|
+
DESCRIPTION
|
|
673
|
+
Allows you to configure critical PDFButler settings such as the service URL, region, and stage.
|
|
674
|
+
|
|
675
|
+
You must run this command from the termianl.
|
|
676
|
+
|
|
677
|
+
EXAMPLES
|
|
678
|
+
Set settings:
|
|
679
|
+
|
|
680
|
+
$ sf butler pb adminsettings -t sfusername@sandbox.com -u 'https://us1.pdfbutler.com'
|
|
681
|
+
-r 'LOCAL' -s 'TEST'
|
|
682
|
+
|
|
683
|
+
# Console output:
|
|
684
|
+
[INFO] Authenticating user: sfusername@sandbox.com
|
|
685
|
+
[INFO] Connected to sfusername@sandbox.com (Org ID: org_id)
|
|
686
|
+
[INFO] Sending data to ***:
|
|
687
|
+
{
|
|
688
|
+
"url":"https://us1.pdfbutler.com/",
|
|
689
|
+
"region":"LOCAL",
|
|
690
|
+
"stage":"TEST"
|
|
691
|
+
}
|
|
692
|
+
[INFO] Successfully imported settings.
|
|
693
|
+
|
|
694
|
+
FLAG DESCRIPTIONS
|
|
695
|
+
-t, --target <value>
|
|
696
|
+
Specifies the Salesforce org username credentials to connect to the target
|
|
697
|
+
org where the settings will be setuped. This flag is required for authentication.
|
|
698
|
+
|
|
699
|
+
-u, --url <value>
|
|
700
|
+
The base URL for the PDFButler service.
|
|
701
|
+
|
|
702
|
+
-r, --region <value>
|
|
703
|
+
Specifies the geographic region for the service (e.g., EU, US).
|
|
704
|
+
|
|
705
|
+
-s, --stage <value>
|
|
706
|
+
The deployment stage (e.g., dev, staging, production).
|
|
707
|
+
|
|
708
|
+
--session
|
|
709
|
+
This flag is used to provide a Salesforce Session ID for authentication.
|
|
710
|
+
|
|
711
|
+
--instance
|
|
712
|
+
This flag specifies the Salesforce Instance URL. The Instance URL corresponds to the specific Salesforce environment (e.g., production, sandbox) you are connecting to.
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
## butler pb admincredentials
|
|
716
|
+
|
|
717
|
+
<span style="color: red;">Important!</span> Make sure you have installed PDF Butler version equal or higher than v1.440. <br/>
|
|
718
|
+
|
|
719
|
+
Setup the PDF Butler Admin Credentials.
|
|
720
|
+
|
|
721
|
+
```
|
|
722
|
+
USAGE
|
|
723
|
+
$ sf butler pb admincredentials [--target | -t <value>] [--username | -u <value>] [--password | -p <value>] [--user-password <value>] [--session <value>] [--instance <value>]
|
|
724
|
+
|
|
725
|
+
FLAGS
|
|
726
|
+
-t, --target=<value> The Salesforce org username credentials to connect to the target org. (Required)
|
|
727
|
+
-u, --username=<value> The admin username for PDFButler. (Required)
|
|
728
|
+
-p, --password=<value> The admin password for PDFButler. (Required)
|
|
729
|
+
--user-password=<value> The user password for PDFButler. (Required)
|
|
730
|
+
--session=<value> This flag is used to provide a Salesforce Session ID for authentication.
|
|
731
|
+
--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.
|
|
732
|
+
|
|
733
|
+
DESCRIPTION
|
|
734
|
+
Enables you to securely provide or update the PDFButler admin credentials.
|
|
735
|
+
|
|
736
|
+
You must run this command from the termianl.
|
|
737
|
+
|
|
738
|
+
EXAMPLES
|
|
739
|
+
Set settings:
|
|
740
|
+
|
|
741
|
+
$ sf butler pb admincredentials -t sfusername@sandbox.com -u 'username'
|
|
742
|
+
-p 'ADMIN_password' --user-password 'USER_password' -l
|
|
743
|
+
|
|
744
|
+
# Console output:
|
|
745
|
+
[INFO] Authenticating user: sfusername@sandbox.com
|
|
746
|
+
[INFO] Connected to sfusername@sandbox.com (Org ID: org_id)
|
|
747
|
+
[INFO] Sending data to endpoint: {
|
|
748
|
+
"username": "sfusername@sandbox.com",
|
|
749
|
+
"password": "ADMIN_password",
|
|
750
|
+
"userPassword": "USER_password"
|
|
751
|
+
}
|
|
752
|
+
[INFO] Successfully imported user credentials.
|
|
753
|
+
|
|
754
|
+
FLAG DESCRIPTIONS
|
|
755
|
+
-t, --target <value>
|
|
756
|
+
Specifies the Salesforce org username credentials to connect to the target
|
|
757
|
+
org where the settings will be setuped. This flag is required for authentication.
|
|
758
|
+
|
|
759
|
+
-u, --username <value>
|
|
760
|
+
The admin username for PDFButler
|
|
761
|
+
|
|
762
|
+
-p, --password <value>
|
|
763
|
+
The admin password for PDFButler.
|
|
764
|
+
|
|
765
|
+
--user-password <value>
|
|
766
|
+
The user password for PDFButler.
|
|
767
|
+
|
|
768
|
+
--session
|
|
769
|
+
This flag is used to provide a Salesforce Session ID for authentication.
|
|
770
|
+
|
|
771
|
+
--instance
|
|
772
|
+
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
773
|
```
|
|
535
774
|
|
|
536
775
|
## 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
|
+
}
|