@ever-works/ever-email-router-plugin 1.0.0 → 1.0.4

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.cjs CHANGED
@@ -21,6 +21,10 @@ var PROBLEM_CODES = [
21
21
  "not_connection_owner",
22
22
  "integration_disabled",
23
23
  "integration_revoked",
24
+ "subject_unknown",
25
+ "link_not_found",
26
+ "oidc_client_exists",
27
+ "redirect_uri_invalid",
24
28
  "denied_by_policy",
25
29
  "integration_not_available",
26
30
  "entitlement_required",
@@ -49,6 +53,8 @@ var PROBLEM_CODES = [
49
53
  "illegal_transition",
50
54
  "already_exists",
51
55
  "already_completed",
56
+ "legal_basis_required",
57
+ "receipt_final",
52
58
  "billing_active",
53
59
  "sso_required",
54
60
  "reauth_required",
@@ -115,6 +121,9 @@ var RECORD_VISIBILITIES = ["private", "team", "organization"];
115
121
  new Set(RECORD_VISIBILITIES);
116
122
  var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
117
123
  new Set(RECORD_LIST_VIEWS);
124
+ new Set(
125
+ "a abbr address applet area article aside audio b base bdi bdo big blockquote body br button canvas caption center cite code col colgroup data datalist dd del details dfn dialog dir div dl dt em embed fieldset figcaption figure font footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe image img input ins kbd label legend li link main map mark marquee math menu meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script search section select slot small source span strike strong style sub summary sup svg table tbody td template textarea tfoot th thead time title tr track tt u ul var video wbr xmp".split(" ")
126
+ );
118
127
  var VERSION = "1.0.0";
119
128
  var GTM_SKILLS = [
120
129
  // ── research ────────────────────────────────────────────────────────
@@ -1822,6 +1831,9 @@ var DOMAIN_EVENT_CATALOG = [
1822
1831
  { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1823
1832
  { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1824
1833
  { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1834
+ // Integration inbox push: an integration's PATCH of its own item, and the member's
1835
+ // answer to an integration item (stored on the item; no run is started).
1836
+ { type: "inbox.item.updated", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1825
1837
  { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1826
1838
  { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1827
1839
  { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
@@ -1887,6 +1899,26 @@ function parseMessageIdList(raw) {
1887
1899
  }
1888
1900
  var PLUGIN_CAPABILITIES = {
1889
1901
  EMAIL_INBOUND: "email-inbound"};
1902
+ var GITHUB_FULL_SCOPES_ALL = [
1903
+ "user:email",
1904
+ "read:user",
1905
+ "repo",
1906
+ "delete_repo",
1907
+ "workflow",
1908
+ "write:repo_hook",
1909
+ "read:org",
1910
+ "project"
1911
+ ];
1912
+ var GITHUB_DELETE_REPO_SCOPE = "delete_repo";
1913
+ function isGithubDeleteRepoScopeEnabled(env = readEnv()) {
1914
+ return (env?.GITHUB_OAUTH_DELETE_REPO_SCOPE_ENABLED ?? "").trim().toLowerCase() === "true";
1915
+ }
1916
+ function readEnv() {
1917
+ return typeof process !== "undefined" ? process.env : void 0;
1918
+ }
1919
+ Object.freeze(
1920
+ GITHUB_FULL_SCOPES_ALL.filter((scope) => scope !== GITHUB_DELETE_REPO_SCOPE || isGithubDeleteRepoScopeEnabled())
1921
+ );
1890
1922
 
1891
1923
  // src/ever-email-router-plugin.ts
1892
1924
  var SECRET_ENV = "EVER_EMAIL_ROUTER_SECRET";
package/dist/index.js CHANGED
@@ -15,6 +15,10 @@ var PROBLEM_CODES = [
15
15
  "not_connection_owner",
16
16
  "integration_disabled",
17
17
  "integration_revoked",
18
+ "subject_unknown",
19
+ "link_not_found",
20
+ "oidc_client_exists",
21
+ "redirect_uri_invalid",
18
22
  "denied_by_policy",
19
23
  "integration_not_available",
20
24
  "entitlement_required",
@@ -43,6 +47,8 @@ var PROBLEM_CODES = [
43
47
  "illegal_transition",
44
48
  "already_exists",
45
49
  "already_completed",
50
+ "legal_basis_required",
51
+ "receipt_final",
46
52
  "billing_active",
47
53
  "sso_required",
48
54
  "reauth_required",
@@ -109,6 +115,9 @@ var RECORD_VISIBILITIES = ["private", "team", "organization"];
109
115
  new Set(RECORD_VISIBILITIES);
110
116
  var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
111
117
  new Set(RECORD_LIST_VIEWS);
118
+ new Set(
119
+ "a abbr address applet area article aside audio b base bdi bdo big blockquote body br button canvas caption center cite code col colgroup data datalist dd del details dfn dialog dir div dl dt em embed fieldset figcaption figure font footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe image img input ins kbd label legend li link main map mark marquee math menu meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script search section select slot small source span strike strong style sub summary sup svg table tbody td template textarea tfoot th thead time title tr track tt u ul var video wbr xmp".split(" ")
120
+ );
112
121
  var VERSION = "1.0.0";
113
122
  var GTM_SKILLS = [
114
123
  // ── research ────────────────────────────────────────────────────────
@@ -1816,6 +1825,9 @@ var DOMAIN_EVENT_CATALOG = [
1816
1825
  { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1817
1826
  { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1818
1827
  { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1828
+ // Integration inbox push: an integration's PATCH of its own item, and the member's
1829
+ // answer to an integration item (stored on the item; no run is started).
1830
+ { type: "inbox.item.updated", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
1819
1831
  { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1820
1832
  { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
1821
1833
  { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
@@ -1881,6 +1893,26 @@ function parseMessageIdList(raw) {
1881
1893
  }
1882
1894
  var PLUGIN_CAPABILITIES = {
1883
1895
  EMAIL_INBOUND: "email-inbound"};
1896
+ var GITHUB_FULL_SCOPES_ALL = [
1897
+ "user:email",
1898
+ "read:user",
1899
+ "repo",
1900
+ "delete_repo",
1901
+ "workflow",
1902
+ "write:repo_hook",
1903
+ "read:org",
1904
+ "project"
1905
+ ];
1906
+ var GITHUB_DELETE_REPO_SCOPE = "delete_repo";
1907
+ function isGithubDeleteRepoScopeEnabled(env = readEnv()) {
1908
+ return (env?.GITHUB_OAUTH_DELETE_REPO_SCOPE_ENABLED ?? "").trim().toLowerCase() === "true";
1909
+ }
1910
+ function readEnv() {
1911
+ return typeof process !== "undefined" ? process.env : void 0;
1912
+ }
1913
+ Object.freeze(
1914
+ GITHUB_FULL_SCOPES_ALL.filter((scope) => scope !== GITHUB_DELETE_REPO_SCOPE || isGithubDeleteRepoScopeEnabled())
1915
+ );
1884
1916
 
1885
1917
  // src/ever-email-router-plugin.ts
1886
1918
  var SECRET_ENV = "EVER_EMAIL_ROUTER_SECRET";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/ever-email-router-plugin",
3
- "version": "1.0.0",
3
+ "version": "1.0.4",
4
4
  "description": "Ever Email Router plugin (inbound) for Ever Works platform — receive mail for @ever.email addresses from the shared Cloudflare router",
5
5
  "author": {
6
6
  "name": "Ever Co. LTD",
@@ -32,7 +32,7 @@
32
32
  "test:watch": "vitest"
33
33
  },
34
34
  "dependencies": {
35
- "@ever-works/plugin": "^1.2.13",
35
+ "@ever-works/plugin": "^1.2.28",
36
36
  "postal-mime": "^4.1.4"
37
37
  },
38
38
  "devDependencies": {
@@ -68,16 +68,16 @@
68
68
  },
69
69
  "repository": {
70
70
  "type": "git",
71
- "url": "git+https://github.com/ever-works/ever-works.git",
71
+ "url": "git+https://github.com/ever-co/ever-works.git",
72
72
  "directory": "packages/plugins/ever-email-router"
73
73
  },
74
- "homepage": "https://github.com/ever-works/ever-works/tree/main/packages/plugins/ever-email-router#readme",
74
+ "homepage": "https://github.com/ever-co/ever-works/tree/main/packages/plugins/ever-email-router#readme",
75
75
  "bugs": {
76
- "url": "https://github.com/ever-works/ever-works/issues"
76
+ "url": "https://github.com/ever-co/ever-works/issues"
77
77
  },
78
78
  "everworksRelease": {
79
- "contentHash": "sha256:2cd08280409ae850f9a45c8555336942147cf53ec7d2afe81d8995120d173559",
80
- "commit": "24837e5bb875bf996052fb319844b6c1d55b7041",
81
- "source": "https://github.com/ever-works/ever-works/tree/24837e5bb875bf996052fb319844b6c1d55b7041/packages/plugins/ever-email-router"
79
+ "contentHash": "sha256:25d4c05d3d12c5bc8117fe74adc92dc14e8bb218c56c69d8a698757cf073114b",
80
+ "commit": "2288ff7e91562b0f079c365348ba08ab3a16f1dd",
81
+ "source": "https://github.com/ever-co/ever-works/tree/2288ff7e91562b0f079c365348ba08ab3a16f1dd/packages/plugins/ever-email-router"
82
82
  }
83
83
  }