@activepieces/piece-github 0.7.2 → 0.8.0

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.
Files changed (132) hide show
  1. package/package.json +9 -5
  2. package/src/i18n/de.json +9 -0
  3. package/src/i18n/es.json +9 -0
  4. package/src/i18n/fr.json +9 -0
  5. package/src/i18n/ja.json +9 -0
  6. package/src/i18n/nl.json +9 -0
  7. package/src/i18n/pt.json +9 -0
  8. package/src/i18n/translation.json +19 -1
  9. package/src/i18n/zh.json +9 -0
  10. package/src/index.d.ts +5 -1
  11. package/src/index.d.ts.map +1 -1
  12. package/src/index.js +2 -1
  13. package/src/index.js.map +1 -1
  14. package/src/lib/actions/add-labels-to-issue.d.ts +28 -4
  15. package/src/lib/actions/add-labels-to-issue.d.ts.map +1 -1
  16. package/src/lib/actions/add-labels-to-issue.js +1 -1
  17. package/src/lib/actions/add-labels-to-issue.js.map +1 -1
  18. package/src/lib/actions/create-branch.d.ts +19 -3
  19. package/src/lib/actions/create-branch.d.ts.map +1 -1
  20. package/src/lib/actions/create-branch.js +2 -2
  21. package/src/lib/actions/create-branch.js.map +1 -1
  22. package/src/lib/actions/create-comment-on-a-issue.d.ts +10 -2
  23. package/src/lib/actions/create-comment-on-a-issue.d.ts.map +1 -1
  24. package/src/lib/actions/create-comment-on-a-issue.js +1 -1
  25. package/src/lib/actions/create-comment-on-a-issue.js.map +1 -1
  26. package/src/lib/actions/create-commit-comment.d.ts +10 -2
  27. package/src/lib/actions/create-commit-comment.d.ts.map +1 -1
  28. package/src/lib/actions/create-commit-comment.js +1 -1
  29. package/src/lib/actions/create-commit-comment.js.map +1 -1
  30. package/src/lib/actions/create-discussion-comment.d.ts +10 -2
  31. package/src/lib/actions/create-discussion-comment.d.ts.map +1 -1
  32. package/src/lib/actions/create-discussion-comment.js +1 -1
  33. package/src/lib/actions/create-discussion-comment.js.map +1 -1
  34. package/src/lib/actions/create-gist.d.ts +5 -1
  35. package/src/lib/actions/create-gist.d.ts.map +1 -1
  36. package/src/lib/actions/create-gist.js +6 -2
  37. package/src/lib/actions/create-gist.js.map +1 -1
  38. package/src/lib/actions/create-issue.d.ts +28 -4
  39. package/src/lib/actions/create-issue.d.ts.map +1 -1
  40. package/src/lib/actions/create-issue.js +1 -1
  41. package/src/lib/actions/create-issue.js.map +1 -1
  42. package/src/lib/actions/create-pull-request-review-comment.d.ts +10 -2
  43. package/src/lib/actions/create-pull-request-review-comment.d.ts.map +1 -1
  44. package/src/lib/actions/create-pull-request-review-comment.js +1 -1
  45. package/src/lib/actions/create-pull-request-review-comment.js.map +1 -1
  46. package/src/lib/actions/delete-branch.d.ts +19 -3
  47. package/src/lib/actions/delete-branch.d.ts.map +1 -1
  48. package/src/lib/actions/delete-branch.js +1 -1
  49. package/src/lib/actions/delete-branch.js.map +1 -1
  50. package/src/lib/actions/find-branch.d.ts +10 -2
  51. package/src/lib/actions/find-branch.d.ts.map +1 -1
  52. package/src/lib/actions/find-branch.js +1 -1
  53. package/src/lib/actions/find-branch.js.map +1 -1
  54. package/src/lib/actions/find-issue.d.ts +10 -2
  55. package/src/lib/actions/find-issue.d.ts.map +1 -1
  56. package/src/lib/actions/find-issue.js +1 -1
  57. package/src/lib/actions/find-issue.js.map +1 -1
  58. package/src/lib/actions/find-user.d.ts +5 -1
  59. package/src/lib/actions/find-user.d.ts.map +1 -1
  60. package/src/lib/actions/find-user.js +1 -1
  61. package/src/lib/actions/find-user.js.map +1 -1
  62. package/src/lib/actions/get-issue-information.d.ts +10 -2
  63. package/src/lib/actions/get-issue-information.d.ts.map +1 -1
  64. package/src/lib/actions/get-issue-information.js +1 -1
  65. package/src/lib/actions/get-issue-information.js.map +1 -1
  66. package/src/lib/actions/lock-issue.d.ts +15 -3
  67. package/src/lib/actions/lock-issue.d.ts.map +1 -1
  68. package/src/lib/actions/lock-issue.js +1 -1
  69. package/src/lib/actions/lock-issue.js.map +1 -1
  70. package/src/lib/actions/raw-graphql-query.d.ts +5 -1
  71. package/src/lib/actions/raw-graphql-query.d.ts.map +1 -1
  72. package/src/lib/actions/raw-graphql-query.js +5 -4
  73. package/src/lib/actions/raw-graphql-query.js.map +1 -1
  74. package/src/lib/actions/unlock-issue.d.ts +10 -2
  75. package/src/lib/actions/unlock-issue.d.ts.map +1 -1
  76. package/src/lib/actions/unlock-issue.js +1 -1
  77. package/src/lib/actions/unlock-issue.js.map +1 -1
  78. package/src/lib/actions/update-issue.d.ts +46 -6
  79. package/src/lib/actions/update-issue.d.ts.map +1 -1
  80. package/src/lib/actions/update-issue.js +1 -1
  81. package/src/lib/actions/update-issue.js.map +1 -1
  82. package/src/lib/auth.d.ts +11 -1
  83. package/src/lib/auth.d.ts.map +1 -1
  84. package/src/lib/auth.js +66 -2
  85. package/src/lib/auth.js.map +1 -1
  86. package/src/lib/common/auth-helpers.d.ts +20 -0
  87. package/src/lib/common/auth-helpers.d.ts.map +1 -0
  88. package/src/lib/common/auth-helpers.js +116 -0
  89. package/src/lib/common/auth-helpers.js.map +1 -0
  90. package/src/lib/common/index.d.ts +63 -10
  91. package/src/lib/common/index.d.ts.map +1 -1
  92. package/src/lib/common/index.js +49 -31
  93. package/src/lib/common/index.js.map +1 -1
  94. package/src/lib/trigger/index.d.ts +40 -8
  95. package/src/lib/trigger/index.d.ts.map +1 -1
  96. package/src/lib/trigger/index.js.map +1 -1
  97. package/src/lib/trigger/new-branch.d.ts +40 -8
  98. package/src/lib/trigger/new-branch.d.ts.map +1 -1
  99. package/src/lib/trigger/new-branch.js +2 -2
  100. package/src/lib/trigger/new-branch.js.map +1 -1
  101. package/src/lib/trigger/new-collaborator.d.ts +40 -8
  102. package/src/lib/trigger/new-collaborator.d.ts.map +1 -1
  103. package/src/lib/trigger/new-collaborator.js +2 -2
  104. package/src/lib/trigger/new-collaborator.js.map +1 -1
  105. package/src/lib/trigger/new-commit.d.ts +40 -8
  106. package/src/lib/trigger/new-commit.d.ts.map +1 -1
  107. package/src/lib/trigger/new-commit.js +2 -2
  108. package/src/lib/trigger/new-commit.js.map +1 -1
  109. package/src/lib/trigger/new-label.d.ts +40 -8
  110. package/src/lib/trigger/new-label.d.ts.map +1 -1
  111. package/src/lib/trigger/new-label.js +2 -2
  112. package/src/lib/trigger/new-label.js.map +1 -1
  113. package/src/lib/trigger/new-mention.d.ts +40 -8
  114. package/src/lib/trigger/new-mention.d.ts.map +1 -1
  115. package/src/lib/trigger/new-mention.js +6 -14
  116. package/src/lib/trigger/new-mention.js.map +1 -1
  117. package/src/lib/trigger/new-milestone.d.ts +40 -8
  118. package/src/lib/trigger/new-milestone.d.ts.map +1 -1
  119. package/src/lib/trigger/new-milestone.js +2 -2
  120. package/src/lib/trigger/new-milestone.js.map +1 -1
  121. package/src/lib/trigger/new-release.d.ts +40 -8
  122. package/src/lib/trigger/new-release.d.ts.map +1 -1
  123. package/src/lib/trigger/new-release.js +2 -2
  124. package/src/lib/trigger/new-release.js.map +1 -1
  125. package/src/lib/trigger/new-review-request.d.ts +40 -8
  126. package/src/lib/trigger/new-review-request.d.ts.map +1 -1
  127. package/src/lib/trigger/new-review-request.js +2 -2
  128. package/src/lib/trigger/new-review-request.js.map +1 -1
  129. package/src/lib/trigger/register-trigger.d.ts +40 -8
  130. package/src/lib/trigger/register-trigger.d.ts.map +1 -1
  131. package/src/lib/trigger/register-trigger.js +2 -2
  132. package/src/lib/trigger/register-trigger.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"unlock-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/unlock-issue.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uBAAuB;;;;;;EAyBlC,CAAC"}
1
+ {"version":3,"file":"unlock-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/unlock-issue.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;EAyBlC,CAAC"}
@@ -24,7 +24,7 @@ exports.githubUnlockIssueAction = (0, pieces_framework_1.createAction)({
24
24
  const { issue_number } = propsValue;
25
25
  const { owner, repo } = propsValue.repository;
26
26
  const response = yield (0, common_1.githubApiCall)({
27
- accessToken: auth.access_token,
27
+ auth,
28
28
  method: pieces_common_1.HttpMethod.DELETE,
29
29
  resourceUri: `/repos/${owner}/${repo}/issues/${issue_number}/lock`,
30
30
  });
@@ -1 +1 @@
1
- {"version":3,"file":"unlock-issue.js","sourceRoot":"","sources":["../../../../src/lib/actions/unlock-issue.ts"],"names":[],"mappings":";;;;AAAA,kCAAqC;AACrC,qEAAwE;AACxE,sCAAwD;AACxD,+DAAyD;AAE5C,QAAA,uBAAuB,GAAG,IAAA,+BAAY,EAAC;IAClD,IAAI,EAAE,iBAAU;IAChB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,6BAA6B;IAC1C,KAAK,EAAE;QACL,UAAU,EAAE,qBAAY,CAAC,kBAAkB;QAC3C,YAAY,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC5B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC;YACpC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,UAAW,CAAC;YAE/C,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAa,EAAC;gBACnC,WAAW,EAAE,IAAI,CAAC,YAAY;gBAC9B,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,WAAW,EAAE,UAAU,KAAK,IAAI,IAAI,WAAW,YAAY,OAAO;aACnE,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"unlock-issue.js","sourceRoot":"","sources":["../../../../src/lib/actions/unlock-issue.ts"],"names":[],"mappings":";;;;AAAA,kCAAqC;AACrC,qEAAwE;AACxE,sCAAwD;AACxD,+DAAyD;AAE5C,QAAA,uBAAuB,GAAG,IAAA,+BAAY,EAAC;IAClD,IAAI,EAAE,iBAAU;IAChB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,6BAA6B;IAC1C,KAAK,EAAE;QACL,UAAU,EAAE,qBAAY,CAAC,kBAAkB;QAC3C,YAAY,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC5B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC;YACpC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,UAAW,CAAC;YAE/C,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAa,EAAC;gBACnC,IAAI;gBACJ,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,WAAW,EAAE,UAAU,KAAK,IAAI,IAAI,WAAW,YAAY,OAAO;aACnE,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,15 +1,55 @@
1
- export declare const githubUpdateIssueAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
1
+ export declare const githubUpdateIssueAction: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
+ }>)[], {
2
6
  repository: import("@activepieces/pieces-framework").DropdownProperty<{
3
7
  repo: string;
4
8
  owner: string;
5
- }, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
6
- issue_number: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
9
+ }, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
10
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
12
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
13
+ }>)[]>;
14
+ issue_number: import("@activepieces/pieces-framework").DropdownProperty<number, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
15
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
16
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
17
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
18
+ }>)[]> | import("@activepieces/pieces-framework").DropdownProperty<number, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
19
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
20
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
21
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
22
+ }>)[]>;
7
23
  title: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
24
  body: import("@activepieces/pieces-framework").LongTextProperty<false>;
9
25
  state: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
10
26
  state_reason: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
11
- milestone: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
12
- labels: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
13
- assignees: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
27
+ milestone: import("@activepieces/pieces-framework").DropdownProperty<number, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
28
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
29
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
30
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
31
+ }>)[]> | import("@activepieces/pieces-framework").DropdownProperty<number, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
32
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
33
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
34
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
35
+ }>)[]>;
36
+ labels: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
37
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
38
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
39
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
40
+ }>)[]> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
41
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
42
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
43
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
44
+ }>)[]>;
45
+ assignees: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
46
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
47
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
48
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
49
+ }>)[]> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
50
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
51
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
52
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
53
+ }>)[]>;
14
54
  }>;
15
55
  //# sourceMappingURL=update-issue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/update-issue.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;EAqElC,CAAC"}
1
+ {"version":3,"file":"update-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/update-issue.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqElC,CAAC"}
@@ -69,7 +69,7 @@ exports.githubUpdateIssueAction = (0, pieces_framework_1.createAction)({
69
69
  if (propsValue.milestone !== undefined)
70
70
  body.milestone = propsValue.milestone;
71
71
  const response = yield (0, common_1.githubApiCall)({
72
- accessToken: auth.access_token,
72
+ auth,
73
73
  method: pieces_common_1.HttpMethod.PATCH,
74
74
  resourceUri: `/repos/${owner}/${repo}/issues/${propsValue.issue_number}`,
75
75
  body: body,
@@ -1 +1 @@
1
- {"version":3,"file":"update-issue.js","sourceRoot":"","sources":["../../../../src/lib/actions/update-issue.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAqC;AACrC,sCAAwD;AACxD,+DAAyD;AAE5C,QAAA,uBAAuB,GAAG,IAAA,+BAAY,EAAC;IAClD,IAAI,EAAE,iBAAU;IAChB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,4BAA4B;IACzC,KAAK,EAAE;QACL,UAAU,EAAE,qBAAY,CAAC,kBAAkB;QAC3C,YAAY,EAAE,qBAAY,CAAC,aAAa,EAAE;QAC1C,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC7B,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;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,CAAC,IAAI,KAAK,SAAS;gBAAE,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;YAC/D,IAAI,UAAU,CAAC,KAAK,KAAK,SAAS;gBAAE,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;YAClE,IAAI,UAAU,CAAC,YAAY,KAAK,SAAS;gBACvC,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;YAC9C,IAAI,UAAU,CAAC,SAAS,KAAK,SAAS;gBACpC,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;YACxC,IAAI,UAAU,CAAC,MAAM,KAAK,SAAS;gBAAE,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;YACrE,IAAI,UAAU,CAAC,SAAS,KAAK,SAAS;gBACpC,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;YAExC,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAa,EAAC;gBACnC,IAAI;gBACJ,MAAM,EAAE,0BAAU,CAAC,KAAK;gBACxB,WAAW,EAAE,UAAU,KAAK,IAAI,IAAI,WAAW,UAAU,CAAC,YAAY,EAAE;gBACxE,IAAI,EAAE,IAAI;aACX,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
package/src/lib/auth.d.ts CHANGED
@@ -1,2 +1,12 @@
1
- export declare const githubAuth: import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>;
1
+ export declare const githubOAuth2Auth: import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>;
2
+ export declare const githubAppAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
3
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
6
+ }>;
7
+ export declare const githubAuth: (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
8
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
11
+ }>)[];
2
12
  //# sourceMappingURL=auth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,+GAKrB,CAAC"}
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,+GAO3B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;EAoCxB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;KAAoC,CAAC"}
package/src/lib/auth.js CHANGED
@@ -1,11 +1,75 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.githubAuth = void 0;
3
+ exports.githubAuth = exports.githubAppAuth = exports.githubOAuth2Auth = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const pieces_framework_1 = require("@activepieces/pieces-framework");
5
- exports.githubAuth = pieces_framework_1.PieceAuth.OAuth2({
6
+ const auth_helpers_1 = require("./common/auth-helpers");
7
+ exports.githubOAuth2Auth = pieces_framework_1.PieceAuth.OAuth2({
8
+ description: "Authenticate to GitHub. Platform admins can configure this with either OAuth App credentials or GitHub App credentials (Apps use the same authorize/token endpoints — only the client_id differs). When using a GitHub App, the listed scopes are ignored and the App's installation permissions apply instead.",
6
9
  required: true,
7
10
  authUrl: 'https://github.com/login/oauth/authorize',
8
11
  tokenUrl: 'https://github.com/login/oauth/access_token',
9
12
  scope: ['admin:repo_hook', 'admin:org', 'repo', 'gist'],
10
13
  });
14
+ exports.githubAppAuth = pieces_framework_1.PieceAuth.CustomAuth({
15
+ displayName: 'GitHub App',
16
+ description: "Authenticate as a GitHub App installation. Calls are made by the App's bot identity (e.g. `app-name[bot]`). The App must be installed on the target repos with the permissions required by the actions you intend to run (e.g. Issues: Read & write, Contents: Read & write, Administration: Read & write for webhook triggers).",
17
+ required: true,
18
+ props: {
19
+ appId: pieces_framework_1.Property.ShortText({
20
+ displayName: 'App ID or Client ID',
21
+ description: 'Either the numeric App ID (e.g. `12345`) or the Client ID (e.g. `Iv23li...`) of your GitHub App. The Client ID is recommended for new Apps. Found at Settings → Developer settings → GitHub Apps → your app.',
22
+ required: true,
23
+ }),
24
+ installationId: pieces_framework_1.Property.ShortText({
25
+ displayName: 'Installation ID',
26
+ description: 'The installation ID for the org/user where the App is installed. Visible in the installation URL: `…/installations/{id}`.',
27
+ required: true,
28
+ }),
29
+ privateKey: pieces_framework_1.PieceAuth.SecretText({
30
+ displayName: 'Private Key',
31
+ description: 'The PEM-encoded RSA private key generated for your GitHub App (paste the contents of the `.pem` file).',
32
+ required: true,
33
+ }),
34
+ },
35
+ validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
36
+ const { appId, installationId, privateKey } = auth;
37
+ const jwt = trySignJwt({ appId, privateKey });
38
+ if (!jwt.ok) {
39
+ return { valid: false, error: jwt.error };
40
+ }
41
+ const exchange = yield tryExchangeJwt({ jwt: jwt.value, installationId });
42
+ return exchange.ok
43
+ ? { valid: true }
44
+ : { valid: false, error: exchange.error };
45
+ }),
46
+ });
47
+ exports.githubAuth = [exports.githubOAuth2Auth, exports.githubAppAuth];
48
+ function trySignJwt({ appId, privateKey, }) {
49
+ try {
50
+ return { ok: true, value: (0, auth_helpers_1.signGithubAppJwt)({ appId, privateKey }) };
51
+ }
52
+ catch (e) {
53
+ const message = e instanceof Error ? e.message : String(e);
54
+ return {
55
+ ok: false,
56
+ error: `Could not sign JWT with provided App ID / Client ID and private key: ${message}. Verify the private key is a valid PEM-encoded RSA key.`,
57
+ };
58
+ }
59
+ }
60
+ function tryExchangeJwt(_a) {
61
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ jwt, installationId, }) {
62
+ try {
63
+ yield (0, auth_helpers_1.exchangeAppJwtForInstallationToken)({ jwt, installationId });
64
+ return { ok: true };
65
+ }
66
+ catch (e) {
67
+ const message = e instanceof Error ? e.message : String(e);
68
+ return {
69
+ ok: false,
70
+ error: `Failed to obtain installation token: ${message}. Verify the Installation ID matches an installation of this App.`,
71
+ };
72
+ }
73
+ });
74
+ }
11
75
  //# sourceMappingURL=auth.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;AAAA,qEAA2D;AAE9C,QAAA,UAAU,GAAG,4BAAS,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,0CAA0C;IACnD,QAAQ,EAAE,6CAA6C;IACvD,KAAK,EAAE,CAAC,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC;CACxD,CAAC,CAAC"}
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAAqE;AACrE,wDAG+B;AAElB,QAAA,gBAAgB,GAAG,4BAAS,CAAC,MAAM,CAAC;IAC/C,WAAW,EACT,iTAAiT;IACnT,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,0CAA0C;IACnD,QAAQ,EAAE,6CAA6C;IACvD,KAAK,EAAE,CAAC,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC;CACxD,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,4BAAS,CAAC,UAAU,CAAC;IAChD,WAAW,EAAE,YAAY;IACzB,WAAW,EACT,kUAAkU;IACpU,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC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EAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;IACtE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,OAAO,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC3D,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,wEAAwE,OAAO,0DAA0D;SACjJ,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAe,cAAc;iEAAC,EAC5B,GAAG,EACH,cAAc,GAIf;QACC,IAAI,CAAC;YACH,MAAM,IAAA,iDAAkC,EAAC,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC,CAAC;YAClE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;QACtB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,OAAO,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC3D,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,wCAAwC,OAAO,mEAAmE;aAC1H,CAAC;QACJ,CAAC;IACH,CAAC;CAAA"}
@@ -0,0 +1,20 @@
1
+ import { AppConnectionValueForAuthProperty } from '@activepieces/pieces-framework';
2
+ import type { githubAuth } from '../auth';
3
+ export declare const githubAuthHelpers: {
4
+ getBearerToken: (auth: GithubAuthValue) => Promise<string>;
5
+ };
6
+ export declare function isAppAuth(auth: GithubAuthValue): boolean;
7
+ export declare function getAuthenticatedLogin(auth: GithubAuthValue): Promise<string>;
8
+ export declare function signGithubAppJwt({ appId, privateKey, }: {
9
+ appId: string;
10
+ privateKey: string;
11
+ }): string;
12
+ export declare function exchangeAppJwtForInstallationToken({ jwt, installationId, }: {
13
+ jwt: string;
14
+ installationId: string;
15
+ }): Promise<{
16
+ token: string;
17
+ expiresAt: number;
18
+ }>;
19
+ export type GithubAuthValue = AppConnectionValueForAuthProperty<typeof githubAuth>;
20
+ //# sourceMappingURL=auth-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-helpers.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/auth-helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iCAAiC,EAAE,MAAM,gCAAgC,CAAC;AAGnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,iBAAiB;2BACC,eAAe,KAAG,OAAO,CAAC,MAAM,CAAC;CAO/D,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAExD;AAED,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,MAAM,CAAC,CA0BjB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,UAAU,GACX,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAWT;AAkBD,wBAAsB,kCAAkC,CAAC,EACvD,GAAG,EACH,cAAc,GACf,EAAE;IACD,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAiBhD;AAuCD,MAAM,MAAM,eAAe,GAAG,iCAAiC,CAC7D,OAAO,UAAU,CAClB,CAAC"}
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.githubAuthHelpers = void 0;
4
+ exports.isAppAuth = isAppAuth;
5
+ exports.getAuthenticatedLogin = getAuthenticatedLogin;
6
+ exports.signGithubAppJwt = signGithubAppJwt;
7
+ exports.exchangeAppJwtForInstallationToken = exchangeAppJwtForInstallationToken;
8
+ const tslib_1 = require("tslib");
9
+ const shared_1 = require("@activepieces/shared");
10
+ const pieces_common_1 = require("@activepieces/pieces-common");
11
+ const jsonwebtoken_1 = tslib_1.__importDefault(require("jsonwebtoken"));
12
+ exports.githubAuthHelpers = {
13
+ getBearerToken: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
14
+ const a = auth;
15
+ if (isGithubAppAuth(a)) {
16
+ return getInstallationToken(a.props);
17
+ }
18
+ return a.access_token;
19
+ }),
20
+ };
21
+ function isAppAuth(auth) {
22
+ return isGithubAppAuth(auth);
23
+ }
24
+ function getAuthenticatedLogin(auth) {
25
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
26
+ const a = auth;
27
+ if (isGithubAppAuth(a)) {
28
+ const signedJwt = signGithubAppJwt({
29
+ appId: a.props.appId,
30
+ privateKey: a.props.privateKey,
31
+ });
32
+ const response = yield pieces_common_1.httpClient.sendRequest({
33
+ method: pieces_common_1.HttpMethod.GET,
34
+ url: 'https://api.github.com/app',
35
+ headers: {
36
+ Authorization: `Bearer ${signedJwt}`,
37
+ Accept: 'application/vnd.github+json',
38
+ 'X-GitHub-Api-Version': '2022-11-28',
39
+ },
40
+ });
41
+ return `${response.body.slug}[bot]`;
42
+ }
43
+ const response = yield pieces_common_1.httpClient.sendRequest({
44
+ method: pieces_common_1.HttpMethod.GET,
45
+ url: 'https://api.github.com/user',
46
+ headers: {
47
+ Authorization: `Bearer ${a.access_token}`,
48
+ },
49
+ });
50
+ return response.body.login;
51
+ });
52
+ }
53
+ function signGithubAppJwt({ appId, privateKey, }) {
54
+ const nowSeconds = Math.floor(Date.now() / 1000);
55
+ return jsonwebtoken_1.default.sign({
56
+ iat: nowSeconds - JWT_CLOCK_SKEW_SECONDS,
57
+ exp: nowSeconds + JWT_LIFETIME_SECONDS,
58
+ iss: appId,
59
+ }, normalizePemKey(privateKey), { algorithm: 'RS256' });
60
+ }
61
+ function normalizePemKey(rawKey) {
62
+ var _a;
63
+ const escapedNewlinesReplaced = rawKey.replace(/\\n/g, '\n').trim();
64
+ if (escapedNewlinesReplaced.includes('\n')) {
65
+ return escapedNewlinesReplaced;
66
+ }
67
+ const match = escapedNewlinesReplaced.match(/^(-----BEGIN [A-Z0-9 ]+-----)(.+?)(-----END [A-Z0-9 ]+-----)$/);
68
+ if (!match) {
69
+ return escapedNewlinesReplaced;
70
+ }
71
+ const [, header, body, footer] = match;
72
+ const wrappedBody = (_a = body.replace(/\s+/g, '').match(/.{1,64}/g)) === null || _a === void 0 ? void 0 : _a.join('\n');
73
+ return `${header}\n${wrappedBody}\n${footer}`;
74
+ }
75
+ function exchangeAppJwtForInstallationToken(_a) {
76
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ jwt, installationId, }) {
77
+ const response = yield pieces_common_1.httpClient.sendRequest({
78
+ method: pieces_common_1.HttpMethod.POST,
79
+ url: `https://api.github.com/app/installations/${installationId}/access_tokens`,
80
+ headers: {
81
+ Authorization: `Bearer ${jwt}`,
82
+ Accept: 'application/vnd.github+json',
83
+ 'X-GitHub-Api-Version': '2022-11-28',
84
+ },
85
+ });
86
+ return {
87
+ token: response.body.token,
88
+ expiresAt: new Date(response.body.expires_at).getTime(),
89
+ };
90
+ });
91
+ }
92
+ function isGithubAppAuth(auth) {
93
+ return auth.type === shared_1.AppConnectionType.CUSTOM_AUTH;
94
+ }
95
+ function getInstallationToken(_a) {
96
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ appId, installationId, privateKey, }) {
97
+ const cacheKey = `${appId}:${installationId}`;
98
+ const cached = installationTokenCache.get(cacheKey);
99
+ const now = Date.now();
100
+ if (cached && cached.expiresAt - now > TOKEN_REFRESH_LEEWAY_MS) {
101
+ return cached.token;
102
+ }
103
+ const signedJwt = signGithubAppJwt({ appId, privateKey });
104
+ const { token, expiresAt } = yield exchangeAppJwtForInstallationToken({
105
+ jwt: signedJwt,
106
+ installationId,
107
+ });
108
+ installationTokenCache.set(cacheKey, { token, expiresAt });
109
+ return token;
110
+ });
111
+ }
112
+ const JWT_CLOCK_SKEW_SECONDS = 60;
113
+ const JWT_LIFETIME_SECONDS = 540;
114
+ const TOKEN_REFRESH_LEEWAY_MS = 60 * 1000;
115
+ const installationTokenCache = new Map();
116
+ //# sourceMappingURL=auth-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-helpers.js","sourceRoot":"","sources":["../../../../src/lib/common/auth-helpers.ts"],"names":[],"mappings":";;;AAgBA,8BAEC;AAED,sDA4BC;AAED,4CAiBC;AAkBD,gFAuBC;;AA5GD,iDAAyD;AAEzD,+DAAqE;AACrE,wEAA+B;AAGlB,QAAA,iBAAiB,GAAG;IAC/B,cAAc,EAAE,CAAO,IAAqB,EAAmB,EAAE;QAC/D,MAAM,CAAC,GAAG,IAAkB,CAAC;QAC7B,IAAI,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;YACvB,OAAO,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,CAAC,CAAC,YAAY,CAAC;IACxB,CAAC,CAAA;CACF,CAAC;AAEF,SAAgB,SAAS,CAAC,IAAqB;IAC7C,OAAO,eAAe,CAAC,IAAkB,CAAC,CAAC;AAC7C,CAAC;AAED,SAAsB,qBAAqB,CACzC,IAAqB;;QAErB,MAAM,CAAC,GAAG,IAAkB,CAAC;QAC7B,IAAI,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;YACvB,MAAM,SAAS,GAAG,gBAAgB,CAAC;gBACjC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK;gBACpB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU;aAC/B,CAAC,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAmB;gBAC9D,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,4BAA4B;gBACjC,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,SAAS,EAAE;oBACpC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CAAC;QACD,MAAM,SAAS,GAAG,gBAAgB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;QAC1D,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,MAAM,kCAAkC,CAAC;YACpE,GAAG,EAAE,SAAS;YACd,cAAc;SACf,CAAC,CAAC;QACH,sBAAsB,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC3D,OAAO,KAAK,CAAC;IACf,CAAC;CAAA;AAED,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC,MAAM,uBAAuB,GAAG,EAAE,GAAG,IAAI,CAAC;AAE1C,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAGnC,CAAC"}
@@ -1,29 +1,82 @@
1
1
  import { HttpMessageBody, HttpMethod, HttpResponse } from '@activepieces/pieces-common';
2
+ import { GithubAuthValue } from './auth-helpers';
2
3
  export declare const githubCommon: {
3
4
  baseUrl: string;
4
5
  repositoryDropdown: import("@activepieces/pieces-framework").DropdownProperty<{
5
6
  repo: string;
6
7
  owner: string;
7
- }, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
8
- milestoneDropdown: (required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
9
- branchDropdown: (displayName: string, desc: string, required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
10
- issueDropdown: (required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
11
- assigneeSingleDropdown: (required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
12
- assigneeDropDown: (required?: boolean) => import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
13
- labelDropDown: (required?: boolean) => import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
8
+ }, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
9
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
12
+ }>)[]>;
13
+ milestoneDropdown: (required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<number, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
14
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
15
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
16
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
17
+ }>)[]> | import("@activepieces/pieces-framework").DropdownProperty<number, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
18
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
20
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
21
+ }>)[]>;
22
+ branchDropdown: (displayName: string, desc: string, required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
23
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
24
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
25
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
26
+ }>)[]> | import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
27
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
28
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
29
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
30
+ }>)[]>;
31
+ issueDropdown: (required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<number, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
32
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
33
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
34
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
35
+ }>)[]> | import("@activepieces/pieces-framework").DropdownProperty<number, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
36
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
37
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
38
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
39
+ }>)[]>;
40
+ assigneeSingleDropdown: (required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
41
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
42
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
43
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
44
+ }>)[]> | import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
45
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
46
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
47
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
48
+ }>)[]>;
49
+ assigneeDropDown: (required?: boolean) => import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
50
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
51
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
52
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
53
+ }>)[]> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
54
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
55
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
56
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
57
+ }>)[]>;
58
+ labelDropDown: (required?: boolean) => import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
59
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
60
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
61
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
62
+ }>)[]> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
63
+ appId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
64
+ installationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
65
+ privateKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
66
+ }>)[]>;
14
67
  };
68
+ export declare function githubApiCall<T extends HttpMessageBody>({ auth, method, resourceUri, query, body, }: GithubApiCallParams): Promise<HttpResponse<T>>;
69
+ export declare function githubPaginatedApiCall<T extends HttpMessageBody>({ auth, method, resourceUri, query, body, }: GithubApiCallParams): Promise<T[]>;
15
70
  export interface RepositoryProp {
16
71
  repo: string;
17
72
  owner: string;
18
73
  }
19
74
  export type RequestParams = Record<string, string | number | string[] | undefined>;
20
75
  export type GithubApiCallParams = {
21
- accessToken: string;
76
+ auth: GithubAuthValue;
22
77
  method: HttpMethod;
23
78
  resourceUri: string;
24
79
  query?: RequestParams;
25
80
  body?: any;
26
81
  };
27
- export declare function githubApiCall<T extends HttpMessageBody>({ accessToken, method, resourceUri, query, body, }: GithubApiCallParams): Promise<HttpResponse<T>>;
28
- export declare function githubPaginatedApiCall<T extends HttpMessageBody>({ accessToken, method, resourceUri, query, body, }: GithubApiCallParams): Promise<T[]>;
29
82
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,EACf,UAAU,EAEV,YAAY,EAEb,MAAM,6BAA6B,CAAC;AAKrC,eAAO,MAAM,YAAY;;;cAGb,MAAM;eAAS,MAAM;;;kCAmED,MAAM,QAAQ,MAAM;;;;;CAoKnD,CAAC;AAyCF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAChC,MAAM,EACN,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CACvC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF,wBAAsB,aAAa,CAAC,CAAC,SAAS,eAAe,EAAE,EAC7D,WAAW,EACX,MAAM,EACN,WAAW,EACX,KAAK,EACL,IAAI,GACL,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAyBhD;AAED,wBAAsB,sBAAsB,CAAC,CAAC,SAAS,eAAe,EAAE,EACtE,WAAW,EACX,MAAM,EACN,WAAW,EACX,KAAK,EACL,IAAI,GACL,EAAE,mBAAmB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAwBpC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","s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