@zackbart/connecta 0.28.0 → 0.28.1

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 (40) hide show
  1. package/CHANGELOG.md +173 -0
  2. package/README.md +8 -5
  3. package/dist/artifacts/connector.js +1 -1
  4. package/dist/auth/downstream-oauth.js +147 -28
  5. package/dist/auth/static-oauth.js +504 -0
  6. package/dist/connectors/api-connector.d.ts +168 -0
  7. package/dist/connectors/api-connector.js +127 -0
  8. package/dist/connectors/api.d.ts +8 -71
  9. package/dist/connectors/api.js +10 -99
  10. package/dist/connectors/guarded-fetch.js +37 -3
  11. package/dist/connectors/remote-mcp.js +7 -32
  12. package/dist/index.d.ts +1 -1
  13. package/dist/oauth-partition.js +17 -0
  14. package/dist/providers/basecamp.d.ts +65 -0
  15. package/dist/providers/basecamp.js +445 -0
  16. package/dist/providers/breeze.d.ts +34 -0
  17. package/dist/providers/breeze.js +1402 -0
  18. package/dist/providers/ccb.d.ts +103 -0
  19. package/dist/providers/ccb.js +1570 -0
  20. package/dist/providers/cloudflare.js +1 -1
  21. package/dist/providers/linear.js +1 -1
  22. package/dist/providers/mixpanel.js +1 -1
  23. package/dist/providers/notion.js +1 -1
  24. package/dist/providers/overflow.d.ts +60 -0
  25. package/dist/providers/overflow.js +1572 -0
  26. package/dist/providers/planning-center.d.ts +59 -0
  27. package/dist/providers/planning-center.js +2039 -0
  28. package/dist/providers/revenuecat.js +1 -1
  29. package/dist/providers/stripe.js +1 -1
  30. package/dist/providers/tithely.d.ts +49 -0
  31. package/dist/providers/tithely.js +1034 -0
  32. package/dist/providers/vercel.js +1 -1
  33. package/dist/routes/oauth.js +29 -3
  34. package/dist/version.d.ts +1 -1
  35. package/dist/version.js +1 -1
  36. package/documentation/architecture.md +5 -3
  37. package/documentation/auth.md +120 -6
  38. package/ethos.md +3 -3
  39. package/package.json +25 -1
  40. package/templates/node/package.json +1 -1
@@ -0,0 +1,103 @@
1
+ import type { Connector, ConnectorCallAdmissionPolicy } from "../types.js";
2
+ /** CCB's v2 media type. The API and its token endpoint both require it. */
3
+ export declare const CCB_MEDIA_TYPE = "application/vnd.ccbchurch.v2+json";
4
+ /**
5
+ * The two published environments. Credentials do not cross: sandbox clients
6
+ * work only against the sandbox hosts and production clients only against
7
+ * production, so the environment is part of the client, not a preference.
8
+ */
9
+ export declare const CCB_ENVIRONMENTS: {
10
+ readonly production: {
11
+ readonly apiOrigin: "https://api.ccbchurch.com";
12
+ readonly authorizationEndpoint: "https://oauth.ccbchurch.com/oauth/authorize";
13
+ };
14
+ readonly sandbox: {
15
+ readonly apiOrigin: "https://api-beta.ccbchurch.com";
16
+ readonly authorizationEndpoint: "https://beta-oauth.ccbchurch.com/oauth/authorize";
17
+ };
18
+ };
19
+ /**
20
+ * The read scopes the named tools and the search hatch need, from the
21
+ * `security` requirements of the operations they call (spec revision recorded
22
+ * in the drift manifest). `read:campuses` and `read:church` are there so the
23
+ * ids every projection carries — campus, membership type — can be resolved
24
+ * through `ccb_api_get`. Request these on Pushpay's API access form.
25
+ */
26
+ export declare const CCB_READ_SCOPES: readonly string[];
27
+ /**
28
+ * What `access: "read-write"` adds: the writes of the everyday staff jobs —
29
+ * profiles, groups, events and attendance, form responses, notes, process
30
+ * queues, scheduling. No `delete:` scope, nothing financial, no background
31
+ * checks, and no privacy settings: those are deliberate, so they are only
32
+ * ever requested through an explicit `scopes` list.
33
+ */
34
+ export declare const CCB_WRITE_SCOPES: readonly string[];
35
+ /** How the grant acts: for the whole church, or as one signed-in person. */
36
+ export type CcbMode = "system" | "identity";
37
+ /** Which Pushpay environment the client was issued for. */
38
+ export type CcbEnvironment = keyof typeof CCB_ENVIRONMENTS;
39
+ export interface CcbOptions {
40
+ /** Which church this connection reaches and what it is for. Required. */
41
+ purpose: string;
42
+ /** Human-readable display name; the default names environment, mode, and access. */
43
+ title?: string;
44
+ /** Church-specific conventions appended to the maintained guide. */
45
+ instructions?: string;
46
+ /**
47
+ * The environment the OAuth client was issued for. Required, with no
48
+ * default: sandbox credentials work only against the sandbox hosts and
49
+ * production credentials only against production, and nothing in a client
50
+ * id says which it is. A wrong guess fails at consent with CCB's opaque
51
+ * "Error accessing page".
52
+ */
53
+ environment: CcbEnvironment;
54
+ /**
55
+ * `"system"` (System Auth): a Master Administrator, or someone who can edit
56
+ * system-wide settings, approves the connection once for the whole church,
57
+ * and every caller shares that one grant. `"identity"` (Identity Auth,
58
+ * `resource_owner_auth=true`): each person signs in as themselves, CCB
59
+ * applies that person's own permissions, and every grant is personal. Identity
60
+ * Auth works only after the church has completed System Auth for the same
61
+ * client. Required: the two modes reach different data for different people.
62
+ */
63
+ mode: CcbMode;
64
+ /**
65
+ * The OAuth client id Pushpay issued. Clients are issued by hand through
66
+ * Pushpay's API access request form
67
+ * (https://vendor.ccbchurch.com/goto/forms/15/responses/new), which also
68
+ * fixes the scopes and the redirect URI — register
69
+ * `<publicUrl>/oauth/callback/<id>` there, character for character.
70
+ */
71
+ clientId: string;
72
+ /** The client secret, from deployment configuration. Never stored. */
73
+ clientSecret: string;
74
+ /**
75
+ * `"read"` (default) requests {@link CCB_READ_SCOPES} and ships no write
76
+ * tool; `"read-write"` adds {@link CCB_WRITE_SCOPES} and the approval-gated
77
+ * `ccb_api_mutate`. Exclusive with `scopes`.
78
+ */
79
+ access?: "read" | "read-write";
80
+ /**
81
+ * The exact scope list to request, replacing `access`: narrower (drop
82
+ * `read:individual_notes`) or wider (add `read:background_checks` for the
83
+ * hatch). Must be a subset of what Pushpay granted the client. Any `write:`
84
+ * or `delete:` scope ships `ccb_api_mutate`.
85
+ */
86
+ scopes?: readonly string[];
87
+ /**
88
+ * The church's CCB subdomain (`mychurch` for mychurch.ccbchurch.com). Sent
89
+ * at consent so the approver skips typing it. Optional.
90
+ */
91
+ subdomain?: string;
92
+ /** Default rows per page for list tools: 25 (default), 50, 75, or 100. */
93
+ defaultPerPage?: 25 | 50 | 75 | 100;
94
+ /**
95
+ * Replaces the per-endpoint default admission policy. Pass your own to
96
+ * account for other integrations spending from the same API client.
97
+ */
98
+ callAdmission?: ConnectorCallAdmissionPolicy;
99
+ /** Connector-specific inline result limit; omit to inherit the deployment. */
100
+ maxResultBytes?: number;
101
+ }
102
+ /** A maintained Church Community Builder (Pushpay ChMS) v2 connection. */
103
+ export declare function ccb(id: string, options: CcbOptions): Connector;