@useairfoil/producer-salesforce 0.0.1 → 0.0.3

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 (43) hide show
  1. package/LICENSE.txt +201 -0
  2. package/README.md +102 -0
  3. package/dist/index.d.mts +228 -0
  4. package/dist/index.mjs +3 -0
  5. package/dist/main.d.mts +1 -0
  6. package/dist/main.mjs +1403 -0
  7. package/dist/main.mjs.map +1 -0
  8. package/dist/manifest.d.mts +316 -0
  9. package/dist/manifest.mjs +409 -0
  10. package/dist/manifest.mjs.map +1 -0
  11. package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
  12. package/dist/src-D7c3ea3B.mjs +684 -0
  13. package/dist/src-D7c3ea3B.mjs.map +1 -0
  14. package/package.json +46 -8
  15. package/src/client/auth.ts +87 -0
  16. package/src/client/client.ts +175 -0
  17. package/src/connector.ts +43 -0
  18. package/src/create-table.ts +10 -0
  19. package/src/demo/accounts.ts +165 -0
  20. package/src/demo/activity.ts +227 -0
  21. package/src/demo/cases.ts +172 -0
  22. package/src/demo/contacts.ts +94 -0
  23. package/src/demo/contracts.ts +214 -0
  24. package/src/demo/index.ts +72 -0
  25. package/src/demo/opportunities.ts +211 -0
  26. package/src/demo/setup.ts +366 -0
  27. package/src/demo/shared.ts +143 -0
  28. package/src/index.ts +8 -0
  29. package/src/main.ts +28 -0
  30. package/src/manifest.ts +143 -0
  31. package/src/objects/custom-objects.ts +207 -0
  32. package/src/objects/describe.ts +70 -0
  33. package/src/objects/object-fields.ts +77 -0
  34. package/src/objects/read.ts +78 -0
  35. package/src/objects/resource.ts +30 -0
  36. package/src/objects/sources.ts +327 -0
  37. package/src/sandbox.ts +37 -0
  38. package/src/schemas/api.ts +82 -0
  39. package/src/schemas/object-fields.ts +58 -0
  40. package/src/schemas/objects.ts +45 -0
  41. package/src/schemas/shared.ts +14 -0
  42. package/src/start.ts +49 -0
  43. package/src/tables.ts +11 -0
package/LICENSE.txt ADDED
@@ -0,0 +1,201 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 GNC Labs Limited
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
193
+ this file except in compliance with the License. You may obtain a copy of the
194
+ License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software distributed
199
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
200
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
201
+ specific language governing permissions and limitations under the License.
package/README.md ADDED
@@ -0,0 +1,102 @@
1
+ # Salesforce producer
2
+
3
+ Syncs Salesforce records from one org: standard objects, custom objects, field
4
+ history, and field definitions. It backfills each table, then polls business
5
+ objects every 10 minutes and setup objects every hour. Salesforce has no signed
6
+ webhooks, so there are none.
7
+
8
+ | Resource | What |
9
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
10
+ | `accounts`, `account_contact_relations`, `account_team_members`, `contacts`, `leads`, `opportunities`, `opportunity_line_items`, `opportunity_contact_roles`, `opportunity_competitors`, `opportunity_team_members`, `opportunity_splits`, `partners`, `forecasting_quotas` | Sales |
11
+ | `quotes`, `quote_line_items`, `contracts`, `contract_contact_roles`, `orders`, `order_items` | Quotes and orders |
12
+ | `products`, `pricebooks`, `pricebook_entries`, `assets`, `asset_relationships` | Catalog and assets |
13
+ | `campaigns`, `campaign_members`, `campaign_member_statuses`, `individuals`, `contact_point_emails`, `contact_point_phones` | Marketing |
14
+ | `cases`, `case_comments`, `case_contact_roles`, `case_team_members`, `entitlements`, `service_contracts`, `contract_line_items`, `solutions`, `email_messages`, `email_message_relations`, `live_chat_transcripts`, `messaging_sessions`, `macros`, `quick_texts` | Service |
15
+ | `work_orders`, `work_order_line_items`, `service_appointments`, `service_resources`, `service_territories`, `assigned_resources`, `resource_absences`, `locations`, `product_items` | Field Service |
16
+ | `tasks`, `task_relations`, `events`, `event_relations`, `notes`, `attachments`, `feed_items`, `feed_comments`, `topics`, `topic_assignments` | Activities |
17
+ | `account_history`, `contact_history`, `lead_history`, `case_history`, `opportunity_history`, `opportunity_field_history` | Field history |
18
+ | `users`, `user_roles`, `profiles`, `permission_sets`, `permission_set_assignments`, `groups`, `group_members`, `collaboration_groups`, `collaboration_group_members`, `record_types`, `business_hours`, `holidays`, `periods`, `organization`, `folders`, `documents` | Users and setup |
19
+ | `duplicate_record_sets`, `duplicate_record_items` | Duplicate rules |
20
+ | `custom_objects` | Records of every custom object (`*__c`) |
21
+ | `object_fields` | Field definitions, to name `fields` keys |
22
+
23
+ ## Config
24
+
25
+ | Variable | Required | Default |
26
+ | -------------------------- | -------- | ------- |
27
+ | `SALESFORCE_DOMAIN` | yes | none |
28
+ | `SALESFORCE_CLIENT_ID` | yes | none |
29
+ | `SALESFORCE_CLIENT_SECRET` | yes | none |
30
+
31
+ `SALESFORCE_DOMAIN` is the org's My Domain host, such as
32
+ `acme.my.salesforce.com`. Sandboxes work too.
33
+
34
+ ## Setup
35
+
36
+ 1. Pick the user the connector runs as. A user with the Salesforce Integration
37
+ license works. Give it API Enabled, read access to the synced objects, and
38
+ View All Data. Without View All Data, records outside its sharing are
39
+ missed.
40
+ 2. In Setup, open **External Client App Manager → New External Client App**.
41
+ Turn on OAuth with the `api` scope and **Enable Client Credentials Flow**.
42
+ The callback URL isn't used.
43
+ 3. In the app's **Policies → OAuth Policies**, turn on the client credentials
44
+ flow and set **Run As** to the user from step 1.
45
+ 4. Under **Settings → OAuth Settings → Consumer Key and Secret**, copy the key
46
+ and secret to `SALESFORCE_CLIENT_ID` and `SALESFORCE_CLIENT_SECRET`.
47
+
48
+ One app and domain read one org, so run one connector per org.
49
+
50
+ ## API version
51
+
52
+ The connector uses REST API `v68.0` (Winter '27).
53
+
54
+ ## Data
55
+
56
+ - Object tables keep every non-null field the user can read in `fields`, by API
57
+ name, as strings: text as is, numbers and booleans as JSON text, and dates as
58
+ Salesforce sends them. New custom fields show up on their own.
59
+ `object_fields` has each field's label, type, and picklist values.
60
+ - Address and location fields are left out, because their parts (such as
61
+ `BillingCity`) are fields too. So are binary fields, such as attachment
62
+ bodies.
63
+ - `created_at` is `CreatedDate` and `updated_at` is `SystemModstamp`. Both are
64
+ null on objects without them, such as history objects.
65
+ - `custom_objects` holds every custom object. `object` says which, such as
66
+ `Invoice__c`.
67
+ - A deleted or merged-away record gets `_deleted`. A restored record comes
68
+ back.
69
+ - Contacts, leads, users, individuals, contact points, cases, emails, chat and
70
+ messaging transcripts, feed items, notes, tasks, and events hold names,
71
+ emails, phone numbers, addresses, and message bodies. Treat them as customer
72
+ data.
73
+
74
+ ## Demo data
75
+
76
+ `pnpm demo --size 128MiB` writes made-up Salesforce data without Salesforce
77
+ credentials. See the Connector Kit README for the flags and the variables it
78
+ needs.
79
+
80
+ Each account has contacts, opportunities with products, quotes, history, and
81
+ splits, and, once won, a contract, an order, assets, a service contract with
82
+ entitlements, an install visit, and an onboarding project in `custom_objects`.
83
+ Customers open cases with comments, emails, and chats. Accounts also get tasks,
84
+ events, notes, Chatter posts, and a lead. The org setup is written once and
85
+ doesn't grow with the size: users, roles, profiles, permissions, groups, the
86
+ catalog and price book, campaigns, service resources, and `object_fields`.
87
+
88
+ ## Limits
89
+
90
+ - Salesforce lists changes for the last 30 days and deletes for the last 15.
91
+ A connector stopped for more than 15 days fails, and those tables need a new
92
+ backfill.
93
+ - Formula fields that read other records only change in a row when the record
94
+ itself changes.
95
+ - `permission_sets`, `permission_set_assignments`, and `collaboration_groups`
96
+ can't be replicated, so they're read in full every hour, and removed rows
97
+ stay.
98
+ - An org without a feature, such as Quotes or Field Service, or a user without
99
+ access, leaves that table in error. The other tables keep syncing.
100
+ - Every table costs at least 2 API calls per poll. With every table on, that's
101
+ about 23,000 calls a day. A Developer Edition org has 15,000, so turn on only
102
+ the tables you need there.
@@ -0,0 +1,228 @@
1
+ import { ObjectSpec, SalesforceConfig, SalesforceConfigDef, manifest, objects } from "./manifest.mjs";
2
+ import { Auth, ConnectorError } from "@useairfoil/connector-kit";
3
+ import { Config, Context, Effect, Layer, Schema } from "effect";
4
+ import { HttpClient } from "effect/http";
5
+ declare namespace auth_d_exports {
6
+ export { SalesforceAuth, SalesforceAuthService, layer$2 as layer, make$2 as make };
7
+ }
8
+ type SalesforceAuthConfig = Pick<SalesforceConfig, "domain" | "clientId" | "clientSecret">;
9
+ type SalesforceAuthService = Auth.TokenCache<ConnectorError>;
10
+ declare const SalesforceAuth_base: Context.ServiceClass<SalesforceAuth, "@useairfoil/producer-salesforce/SalesforceAuth", SalesforceAuthService>;
11
+ declare class SalesforceAuth extends SalesforceAuth_base {}
12
+ declare const make$2: (config: SalesforceAuthConfig) => Effect.Effect<Auth.TokenCache<ConnectorError>, never, HttpClient.HttpClient>;
13
+ declare const layer$2: (config: SalesforceAuthConfig) => Layer.Layer<SalesforceAuth, never, HttpClient.HttpClient>;
14
+ declare namespace client_d_exports {
15
+ export { SALESFORCE_API_VERSION, SalesforceClient, SalesforceClientService, SalesforceResponse, layer$1 as layer, layerConfig$1 as layerConfig, make$1 as make };
16
+ }
17
+ declare const SALESFORCE_API_VERSION = "68.0";
18
+ type SalesforceResponse<A> = {
19
+ readonly body: A;
20
+ /** When the response arrived. Used as the row version. */
21
+ readonly fetchedAt: Date;
22
+ };
23
+ type SalesforceClientService = {
24
+ /** Paths are relative to `/services/data/v68.0`. */
25
+ readonly get: <A>(schema: Schema.Decoder<A>, path: string, params?: Readonly<Record<string, string>>) => Effect.Effect<SalesforceResponse<A>, ConnectorError>;
26
+ readonly post: <A>(schema: Schema.Decoder<A>, path: string, body: unknown) => Effect.Effect<SalesforceResponse<A>, ConnectorError>;
27
+ };
28
+ declare const SalesforceClient_base: Context.ServiceClass<SalesforceClient, "@useairfoil/producer-salesforce/SalesforceClient", SalesforceClientService>;
29
+ declare class SalesforceClient extends SalesforceClient_base {}
30
+ declare const make$1: (config: {
31
+ readonly domain: string;
32
+ readonly clientId: string;
33
+ readonly clientSecret: import("effect/Redacted").Redacted<string>;
34
+ }) => Effect.Effect<SalesforceClientService, never, SalesforceAuth | HttpClient.HttpClient>;
35
+ declare const layer$1: (config: SalesforceConfig) => Layer.Layer<SalesforceClient, never, HttpClient.HttpClient>;
36
+ declare const layerConfig$1: (config: Config.Wrap<SalesforceConfig>) => Layer.Layer<SalesforceClient, Config.ConfigError, HttpClient.HttpClient>;
37
+ declare namespace connector_d_exports {
38
+ export { SalesforceConfig, SalesforceConfigDef, SalesforceConnector, SalesforceConnectorRuntime, layer, layerConfig, make, manifest };
39
+ }
40
+ declare const make: () => Effect.Effect<import("@useairfoil/connector-kit").ConnectorDefinition<readonly [...import("@useairfoil/connector-kit").ResourceDefinition<import("effect/Schema").Struct<{
41
+ id: import("effect/Schema").String;
42
+ version: import("effect/Schema").Date;
43
+ created_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
44
+ updated_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
45
+ fields: import("effect/Schema").$ReadonlyMap<import("effect/Schema").String, import("effect/Schema").String>;
46
+ _deleted: import("effect/Schema").optional<import("effect/Schema").Boolean>;
47
+ }> & import("@useairfoil/connector-kit").Identified<"id">, never, never, string, "version">[], import("@useairfoil/connector-kit").ResourceDefinition<import("effect/Schema").Struct<{
48
+ readonly object: import("effect/Schema").String;
49
+ readonly id: import("effect/Schema").String;
50
+ readonly version: import("effect/Schema").Date;
51
+ readonly created_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
52
+ readonly updated_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
53
+ readonly fields: import("effect/Schema").$ReadonlyMap<import("effect/Schema").String, import("effect/Schema").String>;
54
+ readonly _deleted: import("effect/Schema").optional<import("effect/Schema").Boolean>;
55
+ }> & import("@useairfoil/connector-kit").Identified<"id">, never, never, "custom_objects", "version">, import("@useairfoil/connector-kit").ResourceDefinition<import("effect/Schema").Struct<{
56
+ readonly id: import("effect/Schema").String;
57
+ readonly version: import("effect/Schema").Date;
58
+ readonly object: import("effect/Schema").String;
59
+ readonly name: import("effect/Schema").String;
60
+ readonly label: import("effect/Schema").String;
61
+ readonly type: import("effect/Schema").String;
62
+ readonly custom: import("effect/Schema").Boolean;
63
+ readonly calculated: import("effect/Schema").Boolean;
64
+ readonly nillable: import("effect/Schema").Boolean;
65
+ readonly length: import("effect/Schema").BigInt;
66
+ readonly precision: import("effect/Schema").BigInt;
67
+ readonly scale: import("effect/Schema").BigInt;
68
+ readonly reference_to: import("effect/Schema").$Array<import("effect/Schema").String>;
69
+ readonly picklist_values: import("effect/Schema").$Array<import("effect/Schema").Struct<{
70
+ readonly value: import("effect/Schema").String;
71
+ readonly label: import("effect/Schema").NullOr<import("effect/Schema").String>;
72
+ readonly active: import("effect/Schema").Boolean;
73
+ }>>;
74
+ }> & import("@useairfoil/connector-kit").Identified<"id">, never, never, "object_fields", "version">], readonly [...import("@useairfoil/connector-kit").ResourceDefinition<import("effect/Schema").Struct<{
75
+ id: import("effect/Schema").String;
76
+ version: import("effect/Schema").Date;
77
+ created_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
78
+ updated_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
79
+ fields: import("effect/Schema").$ReadonlyMap<import("effect/Schema").String, import("effect/Schema").String>;
80
+ _deleted: import("effect/Schema").optional<import("effect/Schema").Boolean>;
81
+ }> & import("@useairfoil/connector-kit").Identified<"id">, never, never, string, "version">[], import("@useairfoil/connector-kit").ResourceDefinition<import("effect/Schema").Struct<{
82
+ readonly object: import("effect/Schema").String;
83
+ readonly id: import("effect/Schema").String;
84
+ readonly version: import("effect/Schema").Date;
85
+ readonly created_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
86
+ readonly updated_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
87
+ readonly fields: import("effect/Schema").$ReadonlyMap<import("effect/Schema").String, import("effect/Schema").String>;
88
+ readonly _deleted: import("effect/Schema").optional<import("effect/Schema").Boolean>;
89
+ }> & import("@useairfoil/connector-kit").Identified<"id">, never, never, "custom_objects", "version">, import("@useairfoil/connector-kit").ResourceDefinition<import("effect/Schema").Struct<{
90
+ readonly id: import("effect/Schema").String;
91
+ readonly version: import("effect/Schema").Date;
92
+ readonly object: import("effect/Schema").String;
93
+ readonly name: import("effect/Schema").String;
94
+ readonly label: import("effect/Schema").String;
95
+ readonly type: import("effect/Schema").String;
96
+ readonly custom: import("effect/Schema").Boolean;
97
+ readonly calculated: import("effect/Schema").Boolean;
98
+ readonly nillable: import("effect/Schema").Boolean;
99
+ readonly length: import("effect/Schema").BigInt;
100
+ readonly precision: import("effect/Schema").BigInt;
101
+ readonly scale: import("effect/Schema").BigInt;
102
+ readonly reference_to: import("effect/Schema").$Array<import("effect/Schema").String>;
103
+ readonly picklist_values: import("effect/Schema").$Array<import("effect/Schema").Struct<{
104
+ readonly value: import("effect/Schema").String;
105
+ readonly label: import("effect/Schema").NullOr<import("effect/Schema").String>;
106
+ readonly active: import("effect/Schema").Boolean;
107
+ }>>;
108
+ }> & import("@useairfoil/connector-kit").Identified<"id">, never, never, "object_fields", "version">]>, never, SalesforceClient>;
109
+ type SalesforceConnectorRuntime = Effect.Success<ReturnType<typeof make>>;
110
+ declare const SalesforceConnector_base: Context.ServiceClass<SalesforceConnector, "@useairfoil/producer-salesforce/SalesforceConnector", import("@useairfoil/connector-kit").ConnectorDefinition<readonly [...import("@useairfoil/connector-kit").ResourceDefinition<import("effect/Schema").Struct<{
111
+ id: import("effect/Schema").String;
112
+ version: import("effect/Schema").Date;
113
+ created_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
114
+ updated_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
115
+ fields: import("effect/Schema").$ReadonlyMap<import("effect/Schema").String, import("effect/Schema").String>;
116
+ _deleted: import("effect/Schema").optional<import("effect/Schema").Boolean>;
117
+ }> & import("@useairfoil/connector-kit").Identified<"id">, never, never, string, "version">[], import("@useairfoil/connector-kit").ResourceDefinition<import("effect/Schema").Struct<{
118
+ readonly object: import("effect/Schema").String;
119
+ readonly id: import("effect/Schema").String;
120
+ readonly version: import("effect/Schema").Date;
121
+ readonly created_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
122
+ readonly updated_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
123
+ readonly fields: import("effect/Schema").$ReadonlyMap<import("effect/Schema").String, import("effect/Schema").String>;
124
+ readonly _deleted: import("effect/Schema").optional<import("effect/Schema").Boolean>;
125
+ }> & import("@useairfoil/connector-kit").Identified<"id">, never, never, "custom_objects", "version">, import("@useairfoil/connector-kit").ResourceDefinition<import("effect/Schema").Struct<{
126
+ readonly id: import("effect/Schema").String;
127
+ readonly version: import("effect/Schema").Date;
128
+ readonly object: import("effect/Schema").String;
129
+ readonly name: import("effect/Schema").String;
130
+ readonly label: import("effect/Schema").String;
131
+ readonly type: import("effect/Schema").String;
132
+ readonly custom: import("effect/Schema").Boolean;
133
+ readonly calculated: import("effect/Schema").Boolean;
134
+ readonly nillable: import("effect/Schema").Boolean;
135
+ readonly length: import("effect/Schema").BigInt;
136
+ readonly precision: import("effect/Schema").BigInt;
137
+ readonly scale: import("effect/Schema").BigInt;
138
+ readonly reference_to: import("effect/Schema").$Array<import("effect/Schema").String>;
139
+ readonly picklist_values: import("effect/Schema").$Array<import("effect/Schema").Struct<{
140
+ readonly value: import("effect/Schema").String;
141
+ readonly label: import("effect/Schema").NullOr<import("effect/Schema").String>;
142
+ readonly active: import("effect/Schema").Boolean;
143
+ }>>;
144
+ }> & import("@useairfoil/connector-kit").Identified<"id">, never, never, "object_fields", "version">], readonly [...import("@useairfoil/connector-kit").ResourceDefinition<import("effect/Schema").Struct<{
145
+ id: import("effect/Schema").String;
146
+ version: import("effect/Schema").Date;
147
+ created_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
148
+ updated_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
149
+ fields: import("effect/Schema").$ReadonlyMap<import("effect/Schema").String, import("effect/Schema").String>;
150
+ _deleted: import("effect/Schema").optional<import("effect/Schema").Boolean>;
151
+ }> & import("@useairfoil/connector-kit").Identified<"id">, never, never, string, "version">[], import("@useairfoil/connector-kit").ResourceDefinition<import("effect/Schema").Struct<{
152
+ readonly object: import("effect/Schema").String;
153
+ readonly id: import("effect/Schema").String;
154
+ readonly version: import("effect/Schema").Date;
155
+ readonly created_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
156
+ readonly updated_at: import("effect/Schema").NullOr<import("effect/Schema").Date>;
157
+ readonly fields: import("effect/Schema").$ReadonlyMap<import("effect/Schema").String, import("effect/Schema").String>;
158
+ readonly _deleted: import("effect/Schema").optional<import("effect/Schema").Boolean>;
159
+ }> & import("@useairfoil/connector-kit").Identified<"id">, never, never, "custom_objects", "version">, import("@useairfoil/connector-kit").ResourceDefinition<import("effect/Schema").Struct<{
160
+ readonly id: import("effect/Schema").String;
161
+ readonly version: import("effect/Schema").Date;
162
+ readonly object: import("effect/Schema").String;
163
+ readonly name: import("effect/Schema").String;
164
+ readonly label: import("effect/Schema").String;
165
+ readonly type: import("effect/Schema").String;
166
+ readonly custom: import("effect/Schema").Boolean;
167
+ readonly calculated: import("effect/Schema").Boolean;
168
+ readonly nillable: import("effect/Schema").Boolean;
169
+ readonly length: import("effect/Schema").BigInt;
170
+ readonly precision: import("effect/Schema").BigInt;
171
+ readonly scale: import("effect/Schema").BigInt;
172
+ readonly reference_to: import("effect/Schema").$Array<import("effect/Schema").String>;
173
+ readonly picklist_values: import("effect/Schema").$Array<import("effect/Schema").Struct<{
174
+ readonly value: import("effect/Schema").String;
175
+ readonly label: import("effect/Schema").NullOr<import("effect/Schema").String>;
176
+ readonly active: import("effect/Schema").Boolean;
177
+ }>>;
178
+ }> & import("@useairfoil/connector-kit").Identified<"id">, never, never, "object_fields", "version">]>>;
179
+ declare class SalesforceConnector extends SalesforceConnector_base {}
180
+ declare const layer: (config: SalesforceConfig) => Layer.Layer<SalesforceConnector, never, import("effect/http/HttpClient").HttpClient>;
181
+ declare const layerConfig: (config: Config.Wrap<SalesforceConfig>) => Layer.Layer<SalesforceConnector, Config.ConfigError, import("effect/http/HttpClient").HttpClient>;
182
+ //#endregion
183
+ //#region src/schemas/object-fields.d.ts
184
+ export declare const ObjectFieldSchema: Schema.Struct<{
185
+ readonly id: Schema.String;
186
+ readonly version: Schema.Date;
187
+ readonly object: Schema.String;
188
+ readonly name: Schema.String;
189
+ readonly label: Schema.String;
190
+ readonly type: Schema.String;
191
+ readonly custom: Schema.Boolean;
192
+ readonly calculated: Schema.Boolean;
193
+ readonly nillable: Schema.Boolean;
194
+ readonly length: Schema.BigInt;
195
+ readonly precision: Schema.BigInt;
196
+ readonly scale: Schema.BigInt;
197
+ readonly reference_to: Schema.$Array<Schema.String>;
198
+ readonly picklist_values: Schema.$Array<Schema.Struct<{
199
+ readonly value: Schema.String;
200
+ readonly label: Schema.NullOr<Schema.String>;
201
+ readonly active: Schema.Boolean;
202
+ }>>;
203
+ }> & import("@useairfoil/connector-kit").Identified<"id">;
204
+ type ObjectField = Schema.Schema.Type<typeof ObjectFieldSchema>;
205
+ //#endregion
206
+ //#region src/schemas/objects.d.ts
207
+ export declare const objectSchema: (object: string) => Schema.Struct<{
208
+ id: Schema.String;
209
+ version: Schema.Date;
210
+ created_at: Schema.NullOr<Schema.Date>;
211
+ updated_at: Schema.NullOr<Schema.Date>;
212
+ fields: Schema.$ReadonlyMap<Schema.String, Schema.String>;
213
+ _deleted: Schema.optional<Schema.Boolean>;
214
+ }> & import("@useairfoil/connector-kit").Identified<"id">;
215
+ type ObjectRow = Schema.Schema.Type<ReturnType<typeof objectSchema>>;
216
+ export declare const CustomObjectSchema: Schema.Struct<{
217
+ readonly object: Schema.String;
218
+ readonly id: Schema.String;
219
+ readonly version: Schema.Date;
220
+ readonly created_at: Schema.NullOr<Schema.Date>;
221
+ readonly updated_at: Schema.NullOr<Schema.Date>;
222
+ readonly fields: Schema.$ReadonlyMap<Schema.String, Schema.String>;
223
+ readonly _deleted: Schema.optional<Schema.Boolean>;
224
+ }> & import("@useairfoil/connector-kit").Identified<"id">;
225
+ type CustomObject = Schema.Schema.Type<typeof CustomObjectSchema>;
226
+ //#endregion
227
+ export { type CustomObject, type ObjectField, type ObjectRow, type ObjectSpec, client_d_exports as SalesforceClient, type SalesforceConfig, connector_d_exports as SalesforceConnector, manifest, objects };
228
+ //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { manifest, objects } from "./manifest.mjs";
2
+ import { a as CustomObjectSchema, i as ObjectFieldSchema, n as connector_exports, o as objectSchema, s as client_exports } from "./src-D7c3ea3B.mjs";
3
+ export { CustomObjectSchema, ObjectFieldSchema, client_exports as SalesforceClient, connector_exports as SalesforceConnector, manifest, objectSchema, objects };
@@ -0,0 +1 @@
1
+ export {}