@credal/actions 0.2.25 → 0.2.27
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/actions/actionMapper.js +7 -1
- package/dist/actions/autogen/templates.d.ts +1 -0
- package/dist/actions/autogen/templates.js +235 -0
- package/dist/actions/autogen/types.d.ts +288 -12
- package/dist/actions/autogen/types.js +64 -0
- package/dist/actions/providers/confluence/updatePage.d.ts +3 -0
- package/dist/actions/providers/confluence/updatePage.js +47 -0
- package/dist/actions/providers/github/searchRepository.d.ts +3 -0
- package/dist/actions/providers/github/searchRepository.js +131 -0
- package/package.json +2 -1
- package/dist/actions/providers/google-oauth/listGmailThreads.d.ts +0 -3
- package/dist/actions/providers/google-oauth/listGmailThreads.js +0 -98
- package/dist/actions/providers/google-oauth/searchGmailMessages.d.ts +0 -3
- package/dist/actions/providers/google-oauth/searchGmailMessages.js +0 -91
- package/dist/actions/providers/jamf/getComputerInventory.d.ts +0 -3
- package/dist/actions/providers/jamf/getComputerInventory.js +0 -45
- package/dist/actions/providers/jamf/getFileVaultRecoveryKey.d.ts +0 -3
- package/dist/actions/providers/jamf/getFileVaultRecoveryKey.js +0 -40
- package/dist/actions/providers/jamf/restartJamfComputerById.d.ts +0 -3
- package/dist/actions/providers/jamf/restartJamfComputerById.js +0 -37
@@ -3208,6 +3208,7 @@ export declare const oktaGetOktaUserOutputSchema: z.ZodObject<{
|
|
3208
3208
|
firstName?: string | undefined;
|
3209
3209
|
lastName?: string | undefined;
|
3210
3210
|
state?: string | undefined;
|
3211
|
+
organization?: string | undefined;
|
3211
3212
|
displayName?: string | undefined;
|
3212
3213
|
login?: string | undefined;
|
3213
3214
|
nickName?: string | undefined;
|
@@ -3215,7 +3216,6 @@ export declare const oktaGetOktaUserOutputSchema: z.ZodObject<{
|
|
3215
3216
|
profileUrl?: string | undefined;
|
3216
3217
|
preferredLanguage?: string | undefined;
|
3217
3218
|
userType?: string | undefined;
|
3218
|
-
organization?: string | undefined;
|
3219
3219
|
division?: string | undefined;
|
3220
3220
|
department?: string | undefined;
|
3221
3221
|
costCenter?: string | undefined;
|
@@ -3232,6 +3232,7 @@ export declare const oktaGetOktaUserOutputSchema: z.ZodObject<{
|
|
3232
3232
|
firstName?: string | undefined;
|
3233
3233
|
lastName?: string | undefined;
|
3234
3234
|
state?: string | undefined;
|
3235
|
+
organization?: string | undefined;
|
3235
3236
|
displayName?: string | undefined;
|
3236
3237
|
login?: string | undefined;
|
3237
3238
|
nickName?: string | undefined;
|
@@ -3239,7 +3240,6 @@ export declare const oktaGetOktaUserOutputSchema: z.ZodObject<{
|
|
3239
3240
|
profileUrl?: string | undefined;
|
3240
3241
|
preferredLanguage?: string | undefined;
|
3241
3242
|
userType?: string | undefined;
|
3242
|
-
organization?: string | undefined;
|
3243
3243
|
division?: string | undefined;
|
3244
3244
|
department?: string | undefined;
|
3245
3245
|
costCenter?: string | undefined;
|
@@ -3262,6 +3262,7 @@ export declare const oktaGetOktaUserOutputSchema: z.ZodObject<{
|
|
3262
3262
|
firstName?: string | undefined;
|
3263
3263
|
lastName?: string | undefined;
|
3264
3264
|
state?: string | undefined;
|
3265
|
+
organization?: string | undefined;
|
3265
3266
|
displayName?: string | undefined;
|
3266
3267
|
login?: string | undefined;
|
3267
3268
|
nickName?: string | undefined;
|
@@ -3269,7 +3270,6 @@ export declare const oktaGetOktaUserOutputSchema: z.ZodObject<{
|
|
3269
3270
|
profileUrl?: string | undefined;
|
3270
3271
|
preferredLanguage?: string | undefined;
|
3271
3272
|
userType?: string | undefined;
|
3272
|
-
organization?: string | undefined;
|
3273
3273
|
division?: string | undefined;
|
3274
3274
|
department?: string | undefined;
|
3275
3275
|
costCenter?: string | undefined;
|
@@ -3298,6 +3298,7 @@ export declare const oktaGetOktaUserOutputSchema: z.ZodObject<{
|
|
3298
3298
|
firstName?: string | undefined;
|
3299
3299
|
lastName?: string | undefined;
|
3300
3300
|
state?: string | undefined;
|
3301
|
+
organization?: string | undefined;
|
3301
3302
|
displayName?: string | undefined;
|
3302
3303
|
login?: string | undefined;
|
3303
3304
|
nickName?: string | undefined;
|
@@ -3305,7 +3306,6 @@ export declare const oktaGetOktaUserOutputSchema: z.ZodObject<{
|
|
3305
3306
|
profileUrl?: string | undefined;
|
3306
3307
|
preferredLanguage?: string | undefined;
|
3307
3308
|
userType?: string | undefined;
|
3308
|
-
organization?: string | undefined;
|
3309
3309
|
division?: string | undefined;
|
3310
3310
|
department?: string | undefined;
|
3311
3311
|
costCenter?: string | undefined;
|
@@ -3339,6 +3339,7 @@ export declare const oktaGetOktaUserOutputSchema: z.ZodObject<{
|
|
3339
3339
|
firstName?: string | undefined;
|
3340
3340
|
lastName?: string | undefined;
|
3341
3341
|
state?: string | undefined;
|
3342
|
+
organization?: string | undefined;
|
3342
3343
|
displayName?: string | undefined;
|
3343
3344
|
login?: string | undefined;
|
3344
3345
|
nickName?: string | undefined;
|
@@ -3346,7 +3347,6 @@ export declare const oktaGetOktaUserOutputSchema: z.ZodObject<{
|
|
3346
3347
|
profileUrl?: string | undefined;
|
3347
3348
|
preferredLanguage?: string | undefined;
|
3348
3349
|
userType?: string | undefined;
|
3349
|
-
organization?: string | undefined;
|
3350
3350
|
division?: string | undefined;
|
3351
3351
|
department?: string | undefined;
|
3352
3352
|
costCenter?: string | undefined;
|
@@ -3379,6 +3379,7 @@ export declare const oktaGetOktaUserOutputSchema: z.ZodObject<{
|
|
3379
3379
|
firstName?: string | undefined;
|
3380
3380
|
lastName?: string | undefined;
|
3381
3381
|
state?: string | undefined;
|
3382
|
+
organization?: string | undefined;
|
3382
3383
|
displayName?: string | undefined;
|
3383
3384
|
login?: string | undefined;
|
3384
3385
|
nickName?: string | undefined;
|
@@ -3386,7 +3387,6 @@ export declare const oktaGetOktaUserOutputSchema: z.ZodObject<{
|
|
3386
3387
|
profileUrl?: string | undefined;
|
3387
3388
|
preferredLanguage?: string | undefined;
|
3388
3389
|
userType?: string | undefined;
|
3389
|
-
organization?: string | undefined;
|
3390
3390
|
division?: string | undefined;
|
3391
3391
|
department?: string | undefined;
|
3392
3392
|
costCenter?: string | undefined;
|
@@ -5336,6 +5336,282 @@ export declare const githubListPullRequestsOutputSchema: z.ZodObject<{
|
|
5336
5336
|
}>;
|
5337
5337
|
export type githubListPullRequestsOutputType = z.infer<typeof githubListPullRequestsOutputSchema>;
|
5338
5338
|
export type githubListPullRequestsFunction = ActionFunction<githubListPullRequestsParamsType, AuthParamsType, githubListPullRequestsOutputType>;
|
5339
|
+
export declare const githubSearchRepositoryParamsSchema: z.ZodObject<{
|
5340
|
+
organization: z.ZodString;
|
5341
|
+
repository: z.ZodString;
|
5342
|
+
query: z.ZodString;
|
5343
|
+
}, "strip", z.ZodTypeAny, {
|
5344
|
+
query: string;
|
5345
|
+
organization: string;
|
5346
|
+
repository: string;
|
5347
|
+
}, {
|
5348
|
+
query: string;
|
5349
|
+
organization: string;
|
5350
|
+
repository: string;
|
5351
|
+
}>;
|
5352
|
+
export type githubSearchRepositoryParamsType = z.infer<typeof githubSearchRepositoryParamsSchema>;
|
5353
|
+
export declare const githubSearchRepositoryOutputSchema: z.ZodObject<{
|
5354
|
+
code: z.ZodArray<z.ZodObject<{
|
5355
|
+
name: z.ZodString;
|
5356
|
+
path: z.ZodString;
|
5357
|
+
sha: z.ZodString;
|
5358
|
+
url: z.ZodString;
|
5359
|
+
score: z.ZodNumber;
|
5360
|
+
textMatches: z.ZodArray<z.ZodObject<{
|
5361
|
+
object_url: z.ZodOptional<z.ZodString>;
|
5362
|
+
object_type: z.ZodOptional<z.ZodString>;
|
5363
|
+
fragment: z.ZodOptional<z.ZodString>;
|
5364
|
+
matches: z.ZodArray<z.ZodObject<{
|
5365
|
+
text: z.ZodOptional<z.ZodString>;
|
5366
|
+
indices: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
5367
|
+
}, "strip", z.ZodTypeAny, {
|
5368
|
+
text?: string | undefined;
|
5369
|
+
indices?: number[] | undefined;
|
5370
|
+
}, {
|
5371
|
+
text?: string | undefined;
|
5372
|
+
indices?: number[] | undefined;
|
5373
|
+
}>, "many">;
|
5374
|
+
}, "strip", z.ZodTypeAny, {
|
5375
|
+
matches: {
|
5376
|
+
text?: string | undefined;
|
5377
|
+
indices?: number[] | undefined;
|
5378
|
+
}[];
|
5379
|
+
object_url?: string | undefined;
|
5380
|
+
object_type?: string | undefined;
|
5381
|
+
fragment?: string | undefined;
|
5382
|
+
}, {
|
5383
|
+
matches: {
|
5384
|
+
text?: string | undefined;
|
5385
|
+
indices?: number[] | undefined;
|
5386
|
+
}[];
|
5387
|
+
object_url?: string | undefined;
|
5388
|
+
object_type?: string | undefined;
|
5389
|
+
fragment?: string | undefined;
|
5390
|
+
}>, "many">;
|
5391
|
+
}, "strip", z.ZodTypeAny, {
|
5392
|
+
path: string;
|
5393
|
+
name: string;
|
5394
|
+
url: string;
|
5395
|
+
sha: string;
|
5396
|
+
score: number;
|
5397
|
+
textMatches: {
|
5398
|
+
matches: {
|
5399
|
+
text?: string | undefined;
|
5400
|
+
indices?: number[] | undefined;
|
5401
|
+
}[];
|
5402
|
+
object_url?: string | undefined;
|
5403
|
+
object_type?: string | undefined;
|
5404
|
+
fragment?: string | undefined;
|
5405
|
+
}[];
|
5406
|
+
}, {
|
5407
|
+
path: string;
|
5408
|
+
name: string;
|
5409
|
+
url: string;
|
5410
|
+
sha: string;
|
5411
|
+
score: number;
|
5412
|
+
textMatches: {
|
5413
|
+
matches: {
|
5414
|
+
text?: string | undefined;
|
5415
|
+
indices?: number[] | undefined;
|
5416
|
+
}[];
|
5417
|
+
object_url?: string | undefined;
|
5418
|
+
object_type?: string | undefined;
|
5419
|
+
fragment?: string | undefined;
|
5420
|
+
}[];
|
5421
|
+
}>, "many">;
|
5422
|
+
commits: z.ZodArray<z.ZodObject<{
|
5423
|
+
sha: z.ZodString;
|
5424
|
+
url: z.ZodString;
|
5425
|
+
commit: z.ZodOptional<z.ZodObject<{
|
5426
|
+
author: z.ZodObject<{
|
5427
|
+
name: z.ZodString;
|
5428
|
+
email: z.ZodString;
|
5429
|
+
date: z.ZodString;
|
5430
|
+
}, "strip", z.ZodTypeAny, {
|
5431
|
+
date: string;
|
5432
|
+
name: string;
|
5433
|
+
email: string;
|
5434
|
+
}, {
|
5435
|
+
date: string;
|
5436
|
+
name: string;
|
5437
|
+
email: string;
|
5438
|
+
}>;
|
5439
|
+
message: z.ZodString;
|
5440
|
+
}, "strip", z.ZodTypeAny, {
|
5441
|
+
message: string;
|
5442
|
+
author: {
|
5443
|
+
date: string;
|
5444
|
+
name: string;
|
5445
|
+
email: string;
|
5446
|
+
};
|
5447
|
+
}, {
|
5448
|
+
message: string;
|
5449
|
+
author: {
|
5450
|
+
date: string;
|
5451
|
+
name: string;
|
5452
|
+
email: string;
|
5453
|
+
};
|
5454
|
+
}>>;
|
5455
|
+
}, "strip", z.ZodTypeAny, {
|
5456
|
+
url: string;
|
5457
|
+
sha: string;
|
5458
|
+
commit?: {
|
5459
|
+
message: string;
|
5460
|
+
author: {
|
5461
|
+
date: string;
|
5462
|
+
name: string;
|
5463
|
+
email: string;
|
5464
|
+
};
|
5465
|
+
} | undefined;
|
5466
|
+
}, {
|
5467
|
+
url: string;
|
5468
|
+
sha: string;
|
5469
|
+
commit?: {
|
5470
|
+
message: string;
|
5471
|
+
author: {
|
5472
|
+
date: string;
|
5473
|
+
name: string;
|
5474
|
+
email: string;
|
5475
|
+
};
|
5476
|
+
} | undefined;
|
5477
|
+
}>, "many">;
|
5478
|
+
issuesAndPullRequests: z.ZodArray<z.ZodObject<{
|
5479
|
+
number: z.ZodOptional<z.ZodNumber>;
|
5480
|
+
title: z.ZodString;
|
5481
|
+
html_url: z.ZodOptional<z.ZodString>;
|
5482
|
+
state: z.ZodEnum<["open", "closed"]>;
|
5483
|
+
isPullRequest: z.ZodOptional<z.ZodBoolean>;
|
5484
|
+
body: z.ZodOptional<z.ZodString>;
|
5485
|
+
score: z.ZodOptional<z.ZodNumber>;
|
5486
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
5487
|
+
filename: z.ZodString;
|
5488
|
+
status: z.ZodString;
|
5489
|
+
patch: z.ZodOptional<z.ZodString>;
|
5490
|
+
}, "strip", z.ZodTypeAny, {
|
5491
|
+
status: string;
|
5492
|
+
filename: string;
|
5493
|
+
patch?: string | undefined;
|
5494
|
+
}, {
|
5495
|
+
status: string;
|
5496
|
+
filename: string;
|
5497
|
+
patch?: string | undefined;
|
5498
|
+
}>, "many">>;
|
5499
|
+
}, "strip", z.ZodTypeAny, {
|
5500
|
+
title: string;
|
5501
|
+
state: "open" | "closed";
|
5502
|
+
number?: number | undefined;
|
5503
|
+
body?: string | undefined;
|
5504
|
+
files?: {
|
5505
|
+
status: string;
|
5506
|
+
filename: string;
|
5507
|
+
patch?: string | undefined;
|
5508
|
+
}[] | undefined;
|
5509
|
+
score?: number | undefined;
|
5510
|
+
html_url?: string | undefined;
|
5511
|
+
isPullRequest?: boolean | undefined;
|
5512
|
+
}, {
|
5513
|
+
title: string;
|
5514
|
+
state: "open" | "closed";
|
5515
|
+
number?: number | undefined;
|
5516
|
+
body?: string | undefined;
|
5517
|
+
files?: {
|
5518
|
+
status: string;
|
5519
|
+
filename: string;
|
5520
|
+
patch?: string | undefined;
|
5521
|
+
}[] | undefined;
|
5522
|
+
score?: number | undefined;
|
5523
|
+
html_url?: string | undefined;
|
5524
|
+
isPullRequest?: boolean | undefined;
|
5525
|
+
}>, "many">;
|
5526
|
+
}, "strip", z.ZodTypeAny, {
|
5527
|
+
code: {
|
5528
|
+
path: string;
|
5529
|
+
name: string;
|
5530
|
+
url: string;
|
5531
|
+
sha: string;
|
5532
|
+
score: number;
|
5533
|
+
textMatches: {
|
5534
|
+
matches: {
|
5535
|
+
text?: string | undefined;
|
5536
|
+
indices?: number[] | undefined;
|
5537
|
+
}[];
|
5538
|
+
object_url?: string | undefined;
|
5539
|
+
object_type?: string | undefined;
|
5540
|
+
fragment?: string | undefined;
|
5541
|
+
}[];
|
5542
|
+
}[];
|
5543
|
+
commits: {
|
5544
|
+
url: string;
|
5545
|
+
sha: string;
|
5546
|
+
commit?: {
|
5547
|
+
message: string;
|
5548
|
+
author: {
|
5549
|
+
date: string;
|
5550
|
+
name: string;
|
5551
|
+
email: string;
|
5552
|
+
};
|
5553
|
+
} | undefined;
|
5554
|
+
}[];
|
5555
|
+
issuesAndPullRequests: {
|
5556
|
+
title: string;
|
5557
|
+
state: "open" | "closed";
|
5558
|
+
number?: number | undefined;
|
5559
|
+
body?: string | undefined;
|
5560
|
+
files?: {
|
5561
|
+
status: string;
|
5562
|
+
filename: string;
|
5563
|
+
patch?: string | undefined;
|
5564
|
+
}[] | undefined;
|
5565
|
+
score?: number | undefined;
|
5566
|
+
html_url?: string | undefined;
|
5567
|
+
isPullRequest?: boolean | undefined;
|
5568
|
+
}[];
|
5569
|
+
}, {
|
5570
|
+
code: {
|
5571
|
+
path: string;
|
5572
|
+
name: string;
|
5573
|
+
url: string;
|
5574
|
+
sha: string;
|
5575
|
+
score: number;
|
5576
|
+
textMatches: {
|
5577
|
+
matches: {
|
5578
|
+
text?: string | undefined;
|
5579
|
+
indices?: number[] | undefined;
|
5580
|
+
}[];
|
5581
|
+
object_url?: string | undefined;
|
5582
|
+
object_type?: string | undefined;
|
5583
|
+
fragment?: string | undefined;
|
5584
|
+
}[];
|
5585
|
+
}[];
|
5586
|
+
commits: {
|
5587
|
+
url: string;
|
5588
|
+
sha: string;
|
5589
|
+
commit?: {
|
5590
|
+
message: string;
|
5591
|
+
author: {
|
5592
|
+
date: string;
|
5593
|
+
name: string;
|
5594
|
+
email: string;
|
5595
|
+
};
|
5596
|
+
} | undefined;
|
5597
|
+
}[];
|
5598
|
+
issuesAndPullRequests: {
|
5599
|
+
title: string;
|
5600
|
+
state: "open" | "closed";
|
5601
|
+
number?: number | undefined;
|
5602
|
+
body?: string | undefined;
|
5603
|
+
files?: {
|
5604
|
+
status: string;
|
5605
|
+
filename: string;
|
5606
|
+
patch?: string | undefined;
|
5607
|
+
}[] | undefined;
|
5608
|
+
score?: number | undefined;
|
5609
|
+
html_url?: string | undefined;
|
5610
|
+
isPullRequest?: boolean | undefined;
|
5611
|
+
}[];
|
5612
|
+
}>;
|
5613
|
+
export type githubSearchRepositoryOutputType = z.infer<typeof githubSearchRepositoryOutputSchema>;
|
5614
|
+
export type githubSearchRepositoryFunction = ActionFunction<githubSearchRepositoryParamsType, AuthParamsType, githubSearchRepositoryOutputType>;
|
5339
5615
|
export declare const notionSearchByTitleParamsSchema: z.ZodObject<{
|
5340
5616
|
query: z.ZodString;
|
5341
5617
|
}, "strip", z.ZodTypeAny, {
|
@@ -5604,19 +5880,19 @@ export declare const gitlabSearchGroupOutputSchema: z.ZodObject<{
|
|
5604
5880
|
}, "strip", z.ZodTypeAny, {
|
5605
5881
|
path: string;
|
5606
5882
|
data: string;
|
5883
|
+
filename: string;
|
5607
5884
|
project_id: number;
|
5608
5885
|
basename: string;
|
5609
5886
|
ref: string;
|
5610
5887
|
startline: number;
|
5611
|
-
filename: string;
|
5612
5888
|
}, {
|
5613
5889
|
path: string;
|
5614
5890
|
data: string;
|
5891
|
+
filename: string;
|
5615
5892
|
project_id: number;
|
5616
5893
|
basename: string;
|
5617
5894
|
ref: string;
|
5618
5895
|
startline: number;
|
5619
|
-
filename: string;
|
5620
5896
|
}>;
|
5621
5897
|
matchedMergeRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
5622
5898
|
title: z.ZodString;
|
@@ -5638,11 +5914,11 @@ export declare const gitlabSearchGroupOutputSchema: z.ZodObject<{
|
|
5638
5914
|
metadata: {
|
5639
5915
|
path: string;
|
5640
5916
|
data: string;
|
5917
|
+
filename: string;
|
5641
5918
|
project_id: number;
|
5642
5919
|
basename: string;
|
5643
5920
|
ref: string;
|
5644
5921
|
startline: number;
|
5645
|
-
filename: string;
|
5646
5922
|
};
|
5647
5923
|
matchedMergeRequests?: {
|
5648
5924
|
title: string;
|
@@ -5654,11 +5930,11 @@ export declare const gitlabSearchGroupOutputSchema: z.ZodObject<{
|
|
5654
5930
|
metadata: {
|
5655
5931
|
path: string;
|
5656
5932
|
data: string;
|
5933
|
+
filename: string;
|
5657
5934
|
project_id: number;
|
5658
5935
|
basename: string;
|
5659
5936
|
ref: string;
|
5660
5937
|
startline: number;
|
5661
|
-
filename: string;
|
5662
5938
|
};
|
5663
5939
|
matchedMergeRequests?: {
|
5664
5940
|
title: string;
|
@@ -5695,11 +5971,11 @@ export declare const gitlabSearchGroupOutputSchema: z.ZodObject<{
|
|
5695
5971
|
metadata: {
|
5696
5972
|
path: string;
|
5697
5973
|
data: string;
|
5974
|
+
filename: string;
|
5698
5975
|
project_id: number;
|
5699
5976
|
basename: string;
|
5700
5977
|
ref: string;
|
5701
5978
|
startline: number;
|
5702
|
-
filename: string;
|
5703
5979
|
};
|
5704
5980
|
matchedMergeRequests?: {
|
5705
5981
|
title: string;
|
@@ -5736,11 +6012,11 @@ export declare const gitlabSearchGroupOutputSchema: z.ZodObject<{
|
|
5736
6012
|
metadata: {
|
5737
6013
|
path: string;
|
5738
6014
|
data: string;
|
6015
|
+
filename: string;
|
5739
6016
|
project_id: number;
|
5740
6017
|
basename: string;
|
5741
6018
|
ref: string;
|
5742
6019
|
startline: number;
|
5743
|
-
filename: string;
|
5744
6020
|
};
|
5745
6021
|
matchedMergeRequests?: {
|
5746
6022
|
title: string;
|
@@ -3036,6 +3036,70 @@ export const githubListPullRequestsOutputSchema = z.object({
|
|
3036
3036
|
}))
|
3037
3037
|
.describe("A list of pull requests in the repository"),
|
3038
3038
|
});
|
3039
|
+
export const githubSearchRepositoryParamsSchema = z.object({
|
3040
|
+
organization: z.string().describe("The organization to search for data in"),
|
3041
|
+
repository: z.string().describe("The repository to search for data in"),
|
3042
|
+
query: z.string().describe("The query to search for in the repository"),
|
3043
|
+
});
|
3044
|
+
export const githubSearchRepositoryOutputSchema = z.object({
|
3045
|
+
code: z
|
3046
|
+
.array(z.object({
|
3047
|
+
name: z.string().describe("The name of the file that had a match"),
|
3048
|
+
path: z.string().describe("The path of the file that had a match"),
|
3049
|
+
sha: z.string().describe("The SHA of the commit that had a match"),
|
3050
|
+
url: z.string().describe("The URL of the file that had a match"),
|
3051
|
+
score: z.number().describe("The similarity score of the match"),
|
3052
|
+
textMatches: z
|
3053
|
+
.array(z.object({
|
3054
|
+
object_url: z.string().describe("The URL of the object that had a match").optional(),
|
3055
|
+
object_type: z.string().describe("The type of the object that had a match").optional(),
|
3056
|
+
fragment: z.string().describe("The fragment of the text that had a match").optional(),
|
3057
|
+
matches: z
|
3058
|
+
.array(z.object({
|
3059
|
+
text: z.string().describe("The text that had a match").optional(),
|
3060
|
+
indices: z.array(z.number()).describe("The indices of the text that had a match").optional(),
|
3061
|
+
}))
|
3062
|
+
.describe("A list of matches that match the query"),
|
3063
|
+
}))
|
3064
|
+
.describe("A list of text matches that match the query"),
|
3065
|
+
}))
|
3066
|
+
.describe("A list of code results that match the query"),
|
3067
|
+
commits: z
|
3068
|
+
.array(z.object({
|
3069
|
+
sha: z.string().describe("The SHA of the commit that had a match"),
|
3070
|
+
url: z.string().describe("The URL of the commit that had a match"),
|
3071
|
+
commit: z
|
3072
|
+
.object({
|
3073
|
+
author: z.object({
|
3074
|
+
name: z.string().describe("The name of the author"),
|
3075
|
+
email: z.string().describe("The email of the author"),
|
3076
|
+
date: z.string().describe("The date of the commit"),
|
3077
|
+
}),
|
3078
|
+
message: z.string().describe("The message of the commit"),
|
3079
|
+
})
|
3080
|
+
.optional(),
|
3081
|
+
}))
|
3082
|
+
.describe("A list of commits that match the query"),
|
3083
|
+
issuesAndPullRequests: z
|
3084
|
+
.array(z.object({
|
3085
|
+
number: z.number().describe("The number of the issue or pull request").optional(),
|
3086
|
+
title: z.string().describe("The title of the issue or pull request"),
|
3087
|
+
html_url: z.string().describe("The URL of the issue or pull request").optional(),
|
3088
|
+
state: z.enum(["open", "closed"]).describe("The state of the issue or pull request"),
|
3089
|
+
isPullRequest: z.boolean().describe("Whether the issue or pull request is a pull request").optional(),
|
3090
|
+
body: z.string().describe("The body of the issue or pull request").optional(),
|
3091
|
+
score: z.number().describe("The score of the issue or pull request").optional(),
|
3092
|
+
files: z
|
3093
|
+
.array(z.object({
|
3094
|
+
filename: z.string().describe("The filename of the file"),
|
3095
|
+
status: z.string().describe("The status of the file"),
|
3096
|
+
patch: z.string().describe("The patch of the file").optional(),
|
3097
|
+
}))
|
3098
|
+
.describe("A list of files that match the query")
|
3099
|
+
.optional(),
|
3100
|
+
}))
|
3101
|
+
.describe("A list of issues and pull requests that match the query"),
|
3102
|
+
});
|
3039
3103
|
export const notionSearchByTitleParamsSchema = z.object({
|
3040
3104
|
query: z.string().describe("The query to search for in Notion titles"),
|
3041
3105
|
});
|
@@ -0,0 +1,47 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const axios_1 = __importDefault(require("axios"));
|
16
|
+
function getConfluenceApi(baseUrl, username, apiToken) {
|
17
|
+
const api = axios_1.default.create({
|
18
|
+
baseURL: baseUrl,
|
19
|
+
headers: {
|
20
|
+
Accept: "application/json",
|
21
|
+
// Tokens are associated with a specific user.
|
22
|
+
Authorization: `Basic ${Buffer.from(`${username}:${apiToken}`).toString("base64")}`,
|
23
|
+
},
|
24
|
+
});
|
25
|
+
return api;
|
26
|
+
}
|
27
|
+
const confluenceUpdatePage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
28
|
+
const { pageId, username, content, title } = params;
|
29
|
+
const { baseUrl, authToken } = authParams;
|
30
|
+
const api = getConfluenceApi(baseUrl, username, authToken);
|
31
|
+
// Get current version number
|
32
|
+
const response = yield api.get(`/api/v2/pages/${pageId}`);
|
33
|
+
const currVersion = response.data.version.number;
|
34
|
+
yield api.put(`/api/v2/pages/${pageId}`, {
|
35
|
+
id: pageId,
|
36
|
+
status: "current",
|
37
|
+
title,
|
38
|
+
body: {
|
39
|
+
representation: "storage",
|
40
|
+
value: content,
|
41
|
+
},
|
42
|
+
version: {
|
43
|
+
number: currVersion + 1,
|
44
|
+
},
|
45
|
+
});
|
46
|
+
});
|
47
|
+
exports.default = confluenceUpdatePage;
|