@livechat/developer-studio-api 3.1.28 → 3.1.30
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/dist/index.d.mts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +30 -35
- package/dist/index.mjs +30 -35
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -386,15 +386,20 @@ interface GetTextPlatformDashboardReportParams {
|
|
|
386
386
|
is_source_private?: boolean;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
type TriggerType = "manual_only" | "recurring" | "one_time";
|
|
389
|
+
type TriggerType = "manual_only" | "recurring" | "one_time" | "webhook";
|
|
390
390
|
type TriggerPayload = {
|
|
391
391
|
type: "manual_only";
|
|
392
392
|
} | {
|
|
393
393
|
type: "recurring";
|
|
394
|
-
schedule: string
|
|
394
|
+
schedule: string;
|
|
395
395
|
} | {
|
|
396
396
|
type: "one_time";
|
|
397
397
|
at: string;
|
|
398
|
+
} | {
|
|
399
|
+
type: "webhook";
|
|
400
|
+
webhook_event: string;
|
|
401
|
+
webhook_source: string;
|
|
402
|
+
webhook_props: Record<string, string>;
|
|
398
403
|
};
|
|
399
404
|
interface WorkflowsDto {
|
|
400
405
|
name: string;
|
|
@@ -412,6 +417,7 @@ interface WorkflowDto {
|
|
|
412
417
|
updated_at: string;
|
|
413
418
|
created_by: string;
|
|
414
419
|
trigger: TriggerPayload;
|
|
420
|
+
third_party_headers: Record<string, string[]>;
|
|
415
421
|
}
|
|
416
422
|
interface WorkflowDefinitionDto {
|
|
417
423
|
name: string;
|
|
@@ -501,10 +507,12 @@ interface CreateWorkflowPayload {
|
|
|
501
507
|
description: string;
|
|
502
508
|
definition: WorkflowDefinitionDto;
|
|
503
509
|
trigger: TriggerPayload;
|
|
510
|
+
third_party_headers: Record<string, string[]>;
|
|
504
511
|
}
|
|
505
512
|
interface GetWorkflowPayload {
|
|
506
513
|
name: string;
|
|
507
514
|
version?: number;
|
|
515
|
+
third_party_headers?: Record<string, string[]>;
|
|
508
516
|
}
|
|
509
517
|
interface WorkflowExecution {
|
|
510
518
|
id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -386,15 +386,20 @@ interface GetTextPlatformDashboardReportParams {
|
|
|
386
386
|
is_source_private?: boolean;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
type TriggerType = "manual_only" | "recurring" | "one_time";
|
|
389
|
+
type TriggerType = "manual_only" | "recurring" | "one_time" | "webhook";
|
|
390
390
|
type TriggerPayload = {
|
|
391
391
|
type: "manual_only";
|
|
392
392
|
} | {
|
|
393
393
|
type: "recurring";
|
|
394
|
-
schedule: string
|
|
394
|
+
schedule: string;
|
|
395
395
|
} | {
|
|
396
396
|
type: "one_time";
|
|
397
397
|
at: string;
|
|
398
|
+
} | {
|
|
399
|
+
type: "webhook";
|
|
400
|
+
webhook_event: string;
|
|
401
|
+
webhook_source: string;
|
|
402
|
+
webhook_props: Record<string, string>;
|
|
398
403
|
};
|
|
399
404
|
interface WorkflowsDto {
|
|
400
405
|
name: string;
|
|
@@ -412,6 +417,7 @@ interface WorkflowDto {
|
|
|
412
417
|
updated_at: string;
|
|
413
418
|
created_by: string;
|
|
414
419
|
trigger: TriggerPayload;
|
|
420
|
+
third_party_headers: Record<string, string[]>;
|
|
415
421
|
}
|
|
416
422
|
interface WorkflowDefinitionDto {
|
|
417
423
|
name: string;
|
|
@@ -501,10 +507,12 @@ interface CreateWorkflowPayload {
|
|
|
501
507
|
description: string;
|
|
502
508
|
definition: WorkflowDefinitionDto;
|
|
503
509
|
trigger: TriggerPayload;
|
|
510
|
+
third_party_headers: Record<string, string[]>;
|
|
504
511
|
}
|
|
505
512
|
interface GetWorkflowPayload {
|
|
506
513
|
name: string;
|
|
507
514
|
version?: number;
|
|
515
|
+
third_party_headers?: Record<string, string[]>;
|
|
508
516
|
}
|
|
509
517
|
interface WorkflowExecution {
|
|
510
518
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -411,7 +411,7 @@ var gitHubRepositoryApi = {
|
|
|
411
411
|
getRepository(repositoryName, authorization) {
|
|
412
412
|
return __async(this, null, function* () {
|
|
413
413
|
const response = yield githubClientInstance.get(
|
|
414
|
-
`/repos/${
|
|
414
|
+
`/repos/${repositoryName}`,
|
|
415
415
|
getGithubClientConfig({
|
|
416
416
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
417
417
|
ensureAuthorizationToken: true
|
|
@@ -423,7 +423,7 @@ var gitHubRepositoryApi = {
|
|
|
423
423
|
getRepositoryBranches(repositoryName, authorization) {
|
|
424
424
|
return __async(this, null, function* () {
|
|
425
425
|
const response = yield githubClientInstance.get(
|
|
426
|
-
`/repos/${
|
|
426
|
+
`/repos/${repositoryName}/branches`,
|
|
427
427
|
getGithubClientConfig({
|
|
428
428
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
429
429
|
ensureAuthorizationToken: true
|
|
@@ -435,7 +435,7 @@ var gitHubRepositoryApi = {
|
|
|
435
435
|
getRepositoryBranch(repositoryName, repositoryBranch, authorization) {
|
|
436
436
|
return __async(this, null, function* () {
|
|
437
437
|
const response = yield githubClientInstance.get(
|
|
438
|
-
`/repos/${
|
|
438
|
+
`/repos/${repositoryName}/branches`,
|
|
439
439
|
getGithubClientConfig({
|
|
440
440
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
441
441
|
ensureAuthorizationToken: true
|
|
@@ -453,9 +453,7 @@ var gitHubRepositoryApi = {
|
|
|
453
453
|
getRepositorySeed(repositoryName, authorization) {
|
|
454
454
|
return __async(this, null, function* () {
|
|
455
455
|
const { data } = yield githubClientInstance.get(
|
|
456
|
-
`/repos/${
|
|
457
|
-
repositoryName
|
|
458
|
-
)}/contents/livechat.config.json`,
|
|
456
|
+
`/repos/${repositoryName}/contents/livechat.config.json`,
|
|
459
457
|
getGithubClientConfig({
|
|
460
458
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
461
459
|
ensureAuthorizationToken: true
|
|
@@ -470,7 +468,7 @@ var gitHubRepositoryApi = {
|
|
|
470
468
|
let repository;
|
|
471
469
|
if (template) {
|
|
472
470
|
const response2 = yield githubClientInstance.post(
|
|
473
|
-
`/repos/${
|
|
471
|
+
`/repos/${template}/generate`,
|
|
474
472
|
{
|
|
475
473
|
name,
|
|
476
474
|
description: name,
|
|
@@ -501,7 +499,7 @@ var gitHubRepositoryApi = {
|
|
|
501
499
|
repository = response2.data;
|
|
502
500
|
}
|
|
503
501
|
yield githubClientInstance.patch(
|
|
504
|
-
`/repos/${
|
|
502
|
+
`/repos/${repository.full_name}`,
|
|
505
503
|
{
|
|
506
504
|
private: true
|
|
507
505
|
},
|
|
@@ -533,9 +531,7 @@ var gitHubRepositoryApi = {
|
|
|
533
531
|
return __async(this, null, function* () {
|
|
534
532
|
const upsert = (sha) => __async(this, null, function* () {
|
|
535
533
|
const response = yield githubClientInstance.put(
|
|
536
|
-
`/repos/${
|
|
537
|
-
repositoryName
|
|
538
|
-
)}/contents/livechat.config.json`,
|
|
534
|
+
`/repos/${repositoryName}/contents/livechat.config.json`,
|
|
539
535
|
{
|
|
540
536
|
message: "Added LiveChat Developer App configuration",
|
|
541
537
|
sha,
|
|
@@ -567,7 +563,7 @@ var gitHubRepositoryApi = {
|
|
|
567
563
|
deleteRepository(repositoryName, authorization) {
|
|
568
564
|
return __async(this, null, function* () {
|
|
569
565
|
return githubClientInstance.delete(
|
|
570
|
-
`/repos/${
|
|
566
|
+
`/repos/${repositoryName}`,
|
|
571
567
|
getGithubClientConfig({
|
|
572
568
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
573
569
|
ensureAuthorizationToken: true
|
|
@@ -578,7 +574,7 @@ var gitHubRepositoryApi = {
|
|
|
578
574
|
createRepositoryDeployKey(repositoryName, deployKey, authorization) {
|
|
579
575
|
return __async(this, null, function* () {
|
|
580
576
|
const response = yield githubClientInstance.post(
|
|
581
|
-
`/repos/${
|
|
577
|
+
`/repos/${repositoryName}/keys`,
|
|
582
578
|
{
|
|
583
579
|
title: "developer-console-to-netlify",
|
|
584
580
|
key: deployKey
|
|
@@ -595,7 +591,7 @@ var gitHubRepositoryApi = {
|
|
|
595
591
|
return __async(this, null, function* () {
|
|
596
592
|
try {
|
|
597
593
|
const response = yield githubClientInstance.post(
|
|
598
|
-
`/repos/${
|
|
594
|
+
`/repos/${repositoryName}/hooks`,
|
|
599
595
|
{
|
|
600
596
|
name: "web",
|
|
601
597
|
active: true,
|
|
@@ -626,7 +622,7 @@ var gitHubRepositoryApi = {
|
|
|
626
622
|
getFile(path, repositoryName, authorization) {
|
|
627
623
|
return __async(this, null, function* () {
|
|
628
624
|
const { data } = yield githubClientInstance.get(
|
|
629
|
-
`/repos/${
|
|
625
|
+
`/repos/${repositoryName}/contents/${path}`,
|
|
630
626
|
getGithubClientConfig({
|
|
631
627
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
632
628
|
ensureAuthorizationToken: true
|
|
@@ -638,7 +634,7 @@ var gitHubRepositoryApi = {
|
|
|
638
634
|
getCommits(repositoryName, authorization) {
|
|
639
635
|
return __async(this, null, function* () {
|
|
640
636
|
const { data: commits } = yield githubClientInstance.get(
|
|
641
|
-
`/repos/${
|
|
637
|
+
`/repos/${repositoryName}/commits`,
|
|
642
638
|
getGithubClientConfig({
|
|
643
639
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
644
640
|
ensureAuthorizationToken: true
|
|
@@ -656,9 +652,9 @@ var gitHubRepositoryApi = {
|
|
|
656
652
|
object: { sha: currentCommitSha }
|
|
657
653
|
}
|
|
658
654
|
} = yield githubClientInstance.get(
|
|
659
|
-
`/repos/${encodeURIComponent(
|
|
660
|
-
data.
|
|
661
|
-
)}
|
|
655
|
+
`/repos/${data.repositoryName}/git/refs/heads/${encodeURIComponent(
|
|
656
|
+
data.repositoryBranch
|
|
657
|
+
)}`,
|
|
662
658
|
getGithubClientConfig({
|
|
663
659
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
664
660
|
ensureAuthorizationToken: true
|
|
@@ -669,9 +665,7 @@ var gitHubRepositoryApi = {
|
|
|
669
665
|
tree: { sha: treeSha }
|
|
670
666
|
}
|
|
671
667
|
} = yield githubClientInstance.get(
|
|
672
|
-
`/repos/${
|
|
673
|
-
data.repositoryName
|
|
674
|
-
)}/git/commits/${currentCommitSha}`,
|
|
668
|
+
`/repos/${data.repositoryName}/git/commits/${currentCommitSha}`,
|
|
675
669
|
getGithubClientConfig({
|
|
676
670
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
677
671
|
ensureAuthorizationToken: true
|
|
@@ -680,7 +674,7 @@ var gitHubRepositoryApi = {
|
|
|
680
674
|
const {
|
|
681
675
|
data: { sha: newTreeSha }
|
|
682
676
|
} = yield githubClientInstance.post(
|
|
683
|
-
`/repos/${
|
|
677
|
+
`/repos/${data.repositoryName}/git/trees`,
|
|
684
678
|
{
|
|
685
679
|
base_tree: treeSha,
|
|
686
680
|
tree: data.files.map(
|
|
@@ -696,7 +690,7 @@ var gitHubRepositoryApi = {
|
|
|
696
690
|
const {
|
|
697
691
|
data: { sha: newCommitSha }
|
|
698
692
|
} = yield githubClientInstance.post(
|
|
699
|
-
`/repos/${
|
|
693
|
+
`/repos/${data.repositoryName}/git/commits`,
|
|
700
694
|
{
|
|
701
695
|
message: data.message,
|
|
702
696
|
tree: newTreeSha,
|
|
@@ -708,7 +702,7 @@ var gitHubRepositoryApi = {
|
|
|
708
702
|
})
|
|
709
703
|
);
|
|
710
704
|
yield githubClientInstance.post(
|
|
711
|
-
`/repos/${
|
|
705
|
+
`/repos/${data.repositoryName}/git/refs/heads/${data.repositoryBranch}`,
|
|
712
706
|
{ sha: newCommitSha },
|
|
713
707
|
getGithubClientConfig({
|
|
714
708
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
@@ -719,19 +713,16 @@ var gitHubRepositoryApi = {
|
|
|
719
713
|
},
|
|
720
714
|
getRepositoryIssues(repositoryName, state) {
|
|
721
715
|
return __async(this, null, function* () {
|
|
722
|
-
const { data: issues } = yield githubClientInstance.get(`/repos/${
|
|
716
|
+
const { data: issues } = yield githubClientInstance.get(`/repos/${repositoryName}/issues?state=${state}`);
|
|
723
717
|
return issues;
|
|
724
718
|
});
|
|
725
719
|
},
|
|
726
720
|
createRepositoryIssue(repositoryName, title, body) {
|
|
727
721
|
return __async(this, null, function* () {
|
|
728
|
-
yield githubClientInstance.post(
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
body
|
|
733
|
-
}
|
|
734
|
-
);
|
|
722
|
+
yield githubClientInstance.post(`/repos/${repositoryName}/issues`, {
|
|
723
|
+
title,
|
|
724
|
+
body
|
|
725
|
+
});
|
|
735
726
|
});
|
|
736
727
|
}
|
|
737
728
|
};
|
|
@@ -2158,9 +2149,13 @@ var textPlatformWorkflowsApi = {
|
|
|
2158
2149
|
return __async(this, null, function* () {
|
|
2159
2150
|
yield textClientInstance.delete(
|
|
2160
2151
|
`/workflow_platform/workflows/${encodeURIComponent(payload.name)}`,
|
|
2161
|
-
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2152
|
+
__spreadProps(__spreadValues({}, getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2162
2153
|
ensureAuthorizationToken: true
|
|
2163
|
-
}))
|
|
2154
|
+
}))), {
|
|
2155
|
+
data: {
|
|
2156
|
+
third_party_headers: payload.third_party_headers
|
|
2157
|
+
}
|
|
2158
|
+
})
|
|
2164
2159
|
);
|
|
2165
2160
|
});
|
|
2166
2161
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -258,7 +258,7 @@ var gitHubRepositoryApi = {
|
|
|
258
258
|
getRepository(repositoryName, authorization) {
|
|
259
259
|
return __async(this, null, function* () {
|
|
260
260
|
const response = yield githubClientInstance.get(
|
|
261
|
-
`/repos/${
|
|
261
|
+
`/repos/${repositoryName}`,
|
|
262
262
|
getGithubClientConfig({
|
|
263
263
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
264
264
|
ensureAuthorizationToken: true
|
|
@@ -270,7 +270,7 @@ var gitHubRepositoryApi = {
|
|
|
270
270
|
getRepositoryBranches(repositoryName, authorization) {
|
|
271
271
|
return __async(this, null, function* () {
|
|
272
272
|
const response = yield githubClientInstance.get(
|
|
273
|
-
`/repos/${
|
|
273
|
+
`/repos/${repositoryName}/branches`,
|
|
274
274
|
getGithubClientConfig({
|
|
275
275
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
276
276
|
ensureAuthorizationToken: true
|
|
@@ -282,7 +282,7 @@ var gitHubRepositoryApi = {
|
|
|
282
282
|
getRepositoryBranch(repositoryName, repositoryBranch, authorization) {
|
|
283
283
|
return __async(this, null, function* () {
|
|
284
284
|
const response = yield githubClientInstance.get(
|
|
285
|
-
`/repos/${
|
|
285
|
+
`/repos/${repositoryName}/branches`,
|
|
286
286
|
getGithubClientConfig({
|
|
287
287
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
288
288
|
ensureAuthorizationToken: true
|
|
@@ -300,9 +300,7 @@ var gitHubRepositoryApi = {
|
|
|
300
300
|
getRepositorySeed(repositoryName, authorization) {
|
|
301
301
|
return __async(this, null, function* () {
|
|
302
302
|
const { data } = yield githubClientInstance.get(
|
|
303
|
-
`/repos/${
|
|
304
|
-
repositoryName
|
|
305
|
-
)}/contents/livechat.config.json`,
|
|
303
|
+
`/repos/${repositoryName}/contents/livechat.config.json`,
|
|
306
304
|
getGithubClientConfig({
|
|
307
305
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
308
306
|
ensureAuthorizationToken: true
|
|
@@ -317,7 +315,7 @@ var gitHubRepositoryApi = {
|
|
|
317
315
|
let repository;
|
|
318
316
|
if (template) {
|
|
319
317
|
const response2 = yield githubClientInstance.post(
|
|
320
|
-
`/repos/${
|
|
318
|
+
`/repos/${template}/generate`,
|
|
321
319
|
{
|
|
322
320
|
name,
|
|
323
321
|
description: name,
|
|
@@ -348,7 +346,7 @@ var gitHubRepositoryApi = {
|
|
|
348
346
|
repository = response2.data;
|
|
349
347
|
}
|
|
350
348
|
yield githubClientInstance.patch(
|
|
351
|
-
`/repos/${
|
|
349
|
+
`/repos/${repository.full_name}`,
|
|
352
350
|
{
|
|
353
351
|
private: true
|
|
354
352
|
},
|
|
@@ -380,9 +378,7 @@ var gitHubRepositoryApi = {
|
|
|
380
378
|
return __async(this, null, function* () {
|
|
381
379
|
const upsert = (sha) => __async(this, null, function* () {
|
|
382
380
|
const response = yield githubClientInstance.put(
|
|
383
|
-
`/repos/${
|
|
384
|
-
repositoryName
|
|
385
|
-
)}/contents/livechat.config.json`,
|
|
381
|
+
`/repos/${repositoryName}/contents/livechat.config.json`,
|
|
386
382
|
{
|
|
387
383
|
message: "Added LiveChat Developer App configuration",
|
|
388
384
|
sha,
|
|
@@ -414,7 +410,7 @@ var gitHubRepositoryApi = {
|
|
|
414
410
|
deleteRepository(repositoryName, authorization) {
|
|
415
411
|
return __async(this, null, function* () {
|
|
416
412
|
return githubClientInstance.delete(
|
|
417
|
-
`/repos/${
|
|
413
|
+
`/repos/${repositoryName}`,
|
|
418
414
|
getGithubClientConfig({
|
|
419
415
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
420
416
|
ensureAuthorizationToken: true
|
|
@@ -425,7 +421,7 @@ var gitHubRepositoryApi = {
|
|
|
425
421
|
createRepositoryDeployKey(repositoryName, deployKey, authorization) {
|
|
426
422
|
return __async(this, null, function* () {
|
|
427
423
|
const response = yield githubClientInstance.post(
|
|
428
|
-
`/repos/${
|
|
424
|
+
`/repos/${repositoryName}/keys`,
|
|
429
425
|
{
|
|
430
426
|
title: "developer-console-to-netlify",
|
|
431
427
|
key: deployKey
|
|
@@ -442,7 +438,7 @@ var gitHubRepositoryApi = {
|
|
|
442
438
|
return __async(this, null, function* () {
|
|
443
439
|
try {
|
|
444
440
|
const response = yield githubClientInstance.post(
|
|
445
|
-
`/repos/${
|
|
441
|
+
`/repos/${repositoryName}/hooks`,
|
|
446
442
|
{
|
|
447
443
|
name: "web",
|
|
448
444
|
active: true,
|
|
@@ -473,7 +469,7 @@ var gitHubRepositoryApi = {
|
|
|
473
469
|
getFile(path, repositoryName, authorization) {
|
|
474
470
|
return __async(this, null, function* () {
|
|
475
471
|
const { data } = yield githubClientInstance.get(
|
|
476
|
-
`/repos/${
|
|
472
|
+
`/repos/${repositoryName}/contents/${path}`,
|
|
477
473
|
getGithubClientConfig({
|
|
478
474
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
479
475
|
ensureAuthorizationToken: true
|
|
@@ -485,7 +481,7 @@ var gitHubRepositoryApi = {
|
|
|
485
481
|
getCommits(repositoryName, authorization) {
|
|
486
482
|
return __async(this, null, function* () {
|
|
487
483
|
const { data: commits } = yield githubClientInstance.get(
|
|
488
|
-
`/repos/${
|
|
484
|
+
`/repos/${repositoryName}/commits`,
|
|
489
485
|
getGithubClientConfig({
|
|
490
486
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
491
487
|
ensureAuthorizationToken: true
|
|
@@ -503,9 +499,9 @@ var gitHubRepositoryApi = {
|
|
|
503
499
|
object: { sha: currentCommitSha }
|
|
504
500
|
}
|
|
505
501
|
} = yield githubClientInstance.get(
|
|
506
|
-
`/repos/${encodeURIComponent(
|
|
507
|
-
data.
|
|
508
|
-
)}
|
|
502
|
+
`/repos/${data.repositoryName}/git/refs/heads/${encodeURIComponent(
|
|
503
|
+
data.repositoryBranch
|
|
504
|
+
)}`,
|
|
509
505
|
getGithubClientConfig({
|
|
510
506
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
511
507
|
ensureAuthorizationToken: true
|
|
@@ -516,9 +512,7 @@ var gitHubRepositoryApi = {
|
|
|
516
512
|
tree: { sha: treeSha }
|
|
517
513
|
}
|
|
518
514
|
} = yield githubClientInstance.get(
|
|
519
|
-
`/repos/${
|
|
520
|
-
data.repositoryName
|
|
521
|
-
)}/git/commits/${currentCommitSha}`,
|
|
515
|
+
`/repos/${data.repositoryName}/git/commits/${currentCommitSha}`,
|
|
522
516
|
getGithubClientConfig({
|
|
523
517
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
524
518
|
ensureAuthorizationToken: true
|
|
@@ -527,7 +521,7 @@ var gitHubRepositoryApi = {
|
|
|
527
521
|
const {
|
|
528
522
|
data: { sha: newTreeSha }
|
|
529
523
|
} = yield githubClientInstance.post(
|
|
530
|
-
`/repos/${
|
|
524
|
+
`/repos/${data.repositoryName}/git/trees`,
|
|
531
525
|
{
|
|
532
526
|
base_tree: treeSha,
|
|
533
527
|
tree: data.files.map(
|
|
@@ -543,7 +537,7 @@ var gitHubRepositoryApi = {
|
|
|
543
537
|
const {
|
|
544
538
|
data: { sha: newCommitSha }
|
|
545
539
|
} = yield githubClientInstance.post(
|
|
546
|
-
`/repos/${
|
|
540
|
+
`/repos/${data.repositoryName}/git/commits`,
|
|
547
541
|
{
|
|
548
542
|
message: data.message,
|
|
549
543
|
tree: newTreeSha,
|
|
@@ -555,7 +549,7 @@ var gitHubRepositoryApi = {
|
|
|
555
549
|
})
|
|
556
550
|
);
|
|
557
551
|
yield githubClientInstance.post(
|
|
558
|
-
`/repos/${
|
|
552
|
+
`/repos/${data.repositoryName}/git/refs/heads/${data.repositoryBranch}`,
|
|
559
553
|
{ sha: newCommitSha },
|
|
560
554
|
getGithubClientConfig({
|
|
561
555
|
token: authorization == null ? void 0 : authorization.appToken,
|
|
@@ -566,19 +560,16 @@ var gitHubRepositoryApi = {
|
|
|
566
560
|
},
|
|
567
561
|
getRepositoryIssues(repositoryName, state) {
|
|
568
562
|
return __async(this, null, function* () {
|
|
569
|
-
const { data: issues } = yield githubClientInstance.get(`/repos/${
|
|
563
|
+
const { data: issues } = yield githubClientInstance.get(`/repos/${repositoryName}/issues?state=${state}`);
|
|
570
564
|
return issues;
|
|
571
565
|
});
|
|
572
566
|
},
|
|
573
567
|
createRepositoryIssue(repositoryName, title, body) {
|
|
574
568
|
return __async(this, null, function* () {
|
|
575
|
-
yield githubClientInstance.post(
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
body
|
|
580
|
-
}
|
|
581
|
-
);
|
|
569
|
+
yield githubClientInstance.post(`/repos/${repositoryName}/issues`, {
|
|
570
|
+
title,
|
|
571
|
+
body
|
|
572
|
+
});
|
|
582
573
|
});
|
|
583
574
|
}
|
|
584
575
|
};
|
|
@@ -2005,9 +1996,13 @@ var textPlatformWorkflowsApi = {
|
|
|
2005
1996
|
return __async(this, null, function* () {
|
|
2006
1997
|
yield textClientInstance.delete(
|
|
2007
1998
|
`/workflow_platform/workflows/${encodeURIComponent(payload.name)}`,
|
|
2008
|
-
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
1999
|
+
__spreadProps(__spreadValues({}, getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2009
2000
|
ensureAuthorizationToken: true
|
|
2010
|
-
}))
|
|
2001
|
+
}))), {
|
|
2002
|
+
data: {
|
|
2003
|
+
third_party_headers: payload.third_party_headers
|
|
2004
|
+
}
|
|
2005
|
+
})
|
|
2011
2006
|
);
|
|
2012
2007
|
});
|
|
2013
2008
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/developer-studio-api",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.30",
|
|
4
4
|
"description": "This project is API for LiveChat Developer Studio.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"@types/node": "^17.0.12",
|
|
21
21
|
"tsup": "^7.1.0",
|
|
22
22
|
"typescript": "^5.1.6",
|
|
23
|
-
"utils": "0.0.4",
|
|
24
23
|
"eslint-config-custom": "0.0.8",
|
|
25
|
-
"tsconfig": "0.0.1"
|
|
24
|
+
"tsconfig": "0.0.1",
|
|
25
|
+
"utils": "0.0.4"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "tsup",
|