@aglyn/plugins-crm 1.25.0 → 1.26.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-crm",
3
- "version": "1.25.0",
3
+ "version": "1.26.1",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,19 +25,19 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.25.0",
29
- "@aglyn/shared-data-enums": "1.25.0",
30
- "@aglyn/shared-data-mdi": "1.25.0",
31
- "@aglyn/shared-ui-jsx": "1.25.0",
32
- "@aglyn/shared-ui-next": "1.25.0",
33
- "@aglyn/shared-ui-snackstack": "1.25.0",
34
- "@aglyn/shared-util-email": "1.25.0",
35
- "@aglyn/shared-util-http": "1.25.0",
36
- "@aglyn/shared-util-timestamp": "1.25.0",
37
- "@aglyn/shared-util-tools": "1.25.0",
38
- "@aglyn/tenant-data-admin": "1.25.0",
39
- "@aglyn/tenant-feature-instance": "1.25.0",
40
- "@aglyn/tenant-runtime": "1.25.0",
28
+ "@aglyn/aglyn": "1.26.1",
29
+ "@aglyn/shared-data-enums": "1.26.1",
30
+ "@aglyn/shared-data-mdi": "1.26.1",
31
+ "@aglyn/shared-ui-jsx": "1.26.1",
32
+ "@aglyn/shared-ui-next": "1.26.1",
33
+ "@aglyn/shared-ui-snackstack": "1.26.1",
34
+ "@aglyn/shared-util-email": "1.26.1",
35
+ "@aglyn/shared-util-http": "1.26.1",
36
+ "@aglyn/shared-util-timestamp": "1.26.1",
37
+ "@aglyn/shared-util-tools": "1.26.1",
38
+ "@aglyn/tenant-data-admin": "1.26.1",
39
+ "@aglyn/tenant-feature-instance": "1.26.1",
40
+ "@aglyn/tenant-runtime": "1.26.1",
41
41
  "@dnd-kit/core": "^6.3.1",
42
42
  "@dnd-kit/utilities": "^3.2.2",
43
43
  "@swc/helpers": "0.5.24",
@@ -14,7 +14,7 @@ import { _ as _extends } from "@swc/helpers/_/_extends";
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */ import { booleanField, integerField, isoField, nullableField, objectKindField, openObjectField, postalAddressField, queryParam, RECORD_STAMPS, stringField, stringListField, UPDATED_AFTER_PARAM } from "@aglyn/tenant-data-admin/server/api-v1-description";
17
+ */ import { booleanField, integerField, isoField, nullableField, objectKindField, openObjectField, postalAddressField, queryParam, requiredQueryParam, RECORD_STAMPS, stringField, stringListField, UPDATED_AFTER_PARAM } from "@aglyn/tenant-data-admin/server/api-v1-description";
18
18
  /**
19
19
  * The CRM's resources as the customer API's OpenAPI document describes them
20
20
  * (AGL-2733), keyed by the resource each describes — what the console's
@@ -28,9 +28,16 @@ import { _ as _extends } from "@swc/helpers/_/_extends";
28
28
  */ /** How a company picklist field reads in the description (AGL-3514). */ function companyPicklistNote(label, plural) {
29
29
  return `${label}: one of the organization's active ${plural} (CRM › Fields › Companies), matched ` + 'without regard to case. Any other value is refused with a 400 naming the values allowed; ' + 'the value a company already holds is kept even after it is deactivated.';
30
30
  }
31
+ /**
32
+ * The site a lead belongs to (AGL-4225). A lead is a site's record and its id
33
+ * is unique only within the site, so the handler refuses every lead request
34
+ * without one — and until this was declared, a client reading the document
35
+ * could not know to send it.
36
+ */ const LEAD_SITE_PARAM = requiredQueryParam('siteId', 'Required. The site the lead belongs to — the `id` of a site from `listSites`.');
31
37
  export const CRM_API_V1_DESCRIPTIONS = {
32
38
  contacts: {
33
39
  tag: 'Contacts',
40
+ docsPage: 'contacts',
34
41
  description: 'People, organization-wide. Part of the CRM, which is included from Starter.',
35
42
  schemaName: 'Contact',
36
43
  required: [
@@ -122,30 +129,33 @@ export const CRM_API_V1_DESCRIPTIONS = {
122
129
  list: true,
123
130
  returns: 'Contact',
124
131
  entitlement: 'crm',
125
- description: 'Combining `email` with `tag` narrows on `email` and checks `tag` on the page, so pages can come back short. `lifecycleStage` and `ownerUid` live on a per-site profile and are ALWAYS checked on the page.',
132
+ description: 'Lists the workspace’s contacts: one record per person, with email, name, phone, tags and per-site profile. Filter by exact `email` to find one person.',
126
133
  filters: [
127
- queryParam('email', 'Exact match, normalized the way the write path normalizes it. An unusable value is a 400.'),
128
- queryParam('tag', 'Checked on the page when combined with `email`.'),
129
- queryParam('lifecycleStage', 'Always checked on the page.'),
130
- queryParam('ownerUid', 'Always checked on the page.')
134
+ queryParam('email', 'The contact with this email address. Letter case is ignored; an address that cannot be read is refused.'),
135
+ queryParam('tag', 'Contacts with this tag.'),
136
+ queryParam('lifecycleStage', 'Contacts at this lifecycle stage.'),
137
+ queryParam('ownerUid', 'Contacts owned by this workspace member.')
131
138
  ]
132
139
  },
140
+ // openWorld: after saving, the address’s mail domain is looked up (DNS) to flag addresses that would bounce.
133
141
  {
134
142
  path: '/v1/contacts',
135
143
  method: 'post',
136
144
  operationId: 'createContact',
137
- summary: 'Create a contact',
145
+ summary: 'Add a contact',
138
146
  accepts: 'ContactWrite',
139
147
  returns: 'Contact',
140
148
  entitlement: 'crm',
141
149
  creates: true,
142
- description: 'A duplicate email is `409 conflict` (`code: "contact_exists"`), and the message names the existing id.'
150
+ description: 'Adds a person to the workspace’s contacts. An email address is a contact’s identity: one that already belongs to a contact is refused, naming the existing contact’s id. Returns the new contact.',
151
+ openWorld: true
143
152
  },
144
153
  {
145
154
  path: '/v1/contacts/{contactId}',
146
155
  method: 'get',
147
156
  operationId: 'getContact',
148
- summary: 'Retrieve a contact',
157
+ summary: 'Get a contact',
158
+ description: 'Returns one contact. Needs `contactId` from List contacts.',
149
159
  returns: 'Contact',
150
160
  entitlement: 'crm',
151
161
  pathParams: [
@@ -160,6 +170,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
160
170
  method: 'patch',
161
171
  operationId: 'updateContact',
162
172
  summary: 'Update a contact',
173
+ description: 'Changes a contact’s details; fields not sent stay as they are. The email address cannot be changed. Needs `contactId` from List contacts. Returns the updated contact.',
163
174
  accepts: 'ContactWrite',
164
175
  returns: 'Contact',
165
176
  entitlement: 'crm',
@@ -175,6 +186,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
175
186
  method: 'delete',
176
187
  operationId: 'deleteContact',
177
188
  summary: 'Delete a contact',
189
+ description: 'Removes a person from the workspace’s contacts, with the tags, notes, timeline and consent the workspace’s sites hold for them. Permanent. Needs `contactId` from List contacts.',
178
190
  returns: 'Deleted',
179
191
  entitlement: 'crm',
180
192
  pathParams: [
@@ -189,6 +201,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
189
201
  method: 'post',
190
202
  operationId: 'mergeContact',
191
203
  summary: 'Merge two contacts',
204
+ description: 'Folds one contact into another: the contact in `contactId` survives and keeps its email, and the contact named in `sourceContactId` is merged into it and deleted. Permanent. Returns the surviving contact.',
192
205
  accepts: 'ContactMerge',
193
206
  returns: 'Contact',
194
207
  entitlement: 'crm',
@@ -198,7 +211,8 @@ export const CRM_API_V1_DESCRIPTIONS = {
198
211
  name: 'contactId',
199
212
  description: 'The contact that survives.'
200
213
  }
201
- ]
214
+ ],
215
+ idempotent: true
202
216
  }
203
217
  ],
204
218
  components: {
@@ -220,6 +234,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
220
234
  },
221
235
  companies: {
222
236
  tag: 'Companies',
237
+ docsPage: 'companies',
223
238
  description: 'Organizations in the CRM.',
224
239
  schemaName: 'Company',
225
240
  required: [
@@ -300,6 +315,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
300
315
  method: 'get',
301
316
  operationId: 'listCompanies',
302
317
  summary: 'List companies',
318
+ description: 'Lists the companies in the workspace’s CRM. Filter by exact `domain` to find one.',
303
319
  list: true,
304
320
  returns: 'Company',
305
321
  entitlement: 'crm',
@@ -313,18 +329,22 @@ export const CRM_API_V1_DESCRIPTIONS = {
313
329
  path: '/v1/companies',
314
330
  method: 'post',
315
331
  operationId: 'createCompany',
316
- summary: 'Create a company',
332
+ summary: 'Add a company',
317
333
  accepts: 'CompanyWrite',
318
334
  returns: 'Company',
319
335
  entitlement: 'crm',
320
336
  creates: true,
321
- description: 'A duplicate domain is `409 conflict` (`code: "company_exists"`), naming the existing id.'
337
+ description: 'Adds a company to the CRM. Needs a `name`. A company whose domain is already in the CRM is refused, naming the existing id. Returns the new company.',
338
+ bodyRequires: [
339
+ 'name'
340
+ ]
322
341
  },
323
342
  {
324
343
  path: '/v1/companies/{companyId}',
325
344
  method: 'get',
326
345
  operationId: 'getCompany',
327
- summary: 'Retrieve a company',
346
+ summary: 'Get a company',
347
+ description: 'Returns one company. Needs `companyId` from List companies.',
328
348
  returns: 'Company',
329
349
  entitlement: 'crm',
330
350
  pathParams: [
@@ -339,6 +359,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
339
359
  method: 'patch',
340
360
  operationId: 'updateCompany',
341
361
  summary: 'Update a company',
362
+ description: 'Changes a company’s details; fields not sent stay as they are. Needs `companyId` from List companies. Returns the updated company.',
342
363
  accepts: 'CompanyWrite',
343
364
  returns: 'Company',
344
365
  entitlement: 'crm',
@@ -354,6 +375,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
354
375
  method: 'delete',
355
376
  operationId: 'deleteCompany',
356
377
  summary: 'Delete a company',
378
+ description: 'Deletes a company permanently. Needs `companyId` from List companies.',
357
379
  returns: 'Deleted',
358
380
  entitlement: 'crm',
359
381
  pathParams: [
@@ -367,6 +389,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
367
389
  },
368
390
  pipelines: {
369
391
  tag: 'Pipelines',
392
+ docsPage: 'pipelines',
370
393
  description: 'Deal pipelines and their stages. Read-only over the API.',
371
394
  schemaName: 'Pipeline',
372
395
  required: [
@@ -431,7 +454,8 @@ export const CRM_API_V1_DESCRIPTIONS = {
431
454
  path: '/v1/pipelines',
432
455
  method: 'get',
433
456
  operationId: 'listPipelines',
434
- summary: 'List pipelines',
457
+ summary: 'List deal pipelines',
458
+ description: 'Lists the workspace’s sales pipelines and their stages. A stage’s id is the `stageId` a deal takes.',
435
459
  list: true,
436
460
  returns: 'Pipeline',
437
461
  entitlement: 'crm',
@@ -443,7 +467,8 @@ export const CRM_API_V1_DESCRIPTIONS = {
443
467
  path: '/v1/pipelines/{pipelineId}',
444
468
  method: 'get',
445
469
  operationId: 'getPipeline',
446
- summary: 'Retrieve a pipeline',
470
+ summary: 'Get a deal pipeline',
471
+ description: 'Returns one pipeline and its stages. Needs `pipelineId` from List deal pipelines.',
447
472
  returns: 'Pipeline',
448
473
  entitlement: 'crm',
449
474
  pathParams: [
@@ -457,6 +482,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
457
482
  },
458
483
  deals: {
459
484
  tag: 'Deals',
485
+ docsPage: 'deals',
460
486
  description: 'Opportunities moving through a pipeline.',
461
487
  schemaName: 'Deal',
462
488
  required: [
@@ -553,6 +579,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
553
579
  method: 'get',
554
580
  operationId: 'listDeals',
555
581
  summary: 'List deals',
582
+ description: 'Lists the workspace’s deals with their pipeline, stage, amount and status. Filter by pipeline, stage, status or owner.',
556
583
  list: true,
557
584
  returns: 'Deal',
558
585
  entitlement: 'crm',
@@ -572,17 +599,22 @@ export const CRM_API_V1_DESCRIPTIONS = {
572
599
  path: '/v1/deals',
573
600
  method: 'post',
574
601
  operationId: 'createDeal',
575
- summary: 'Create a deal',
602
+ summary: 'Add a deal',
603
+ description: 'Opens a deal. Needs a `title`; `pipelineId` and `stageId` come from List deal pipelines. Returns the new deal.',
576
604
  accepts: 'DealWrite',
577
605
  returns: 'Deal',
578
606
  entitlement: 'crm',
579
- creates: true
607
+ creates: true,
608
+ bodyRequires: [
609
+ 'title'
610
+ ]
580
611
  },
581
612
  {
582
613
  path: '/v1/deals/{dealId}',
583
614
  method: 'get',
584
615
  operationId: 'getDeal',
585
- summary: 'Retrieve a deal',
616
+ summary: 'Get a deal',
617
+ description: 'Returns one deal. Needs `dealId` from List deals.',
586
618
  returns: 'Deal',
587
619
  entitlement: 'crm',
588
620
  pathParams: [
@@ -597,6 +629,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
597
629
  method: 'patch',
598
630
  operationId: 'updateDeal',
599
631
  summary: 'Update a deal',
632
+ description: 'Changes a deal, including moving it to another stage or marking it won or lost; fields not sent stay as they are. Needs `dealId` from List deals. Returns the updated deal.',
600
633
  accepts: 'DealWrite',
601
634
  returns: 'Deal',
602
635
  entitlement: 'crm',
@@ -612,6 +645,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
612
645
  method: 'delete',
613
646
  operationId: 'deleteDeal',
614
647
  summary: 'Delete a deal',
648
+ description: 'Deletes a deal permanently. Needs `dealId` from List deals.',
615
649
  returns: 'Deleted',
616
650
  entitlement: 'crm',
617
651
  pathParams: [
@@ -625,6 +659,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
625
659
  },
626
660
  tasks: {
627
661
  tag: 'Tasks',
662
+ docsPage: 'tasks',
628
663
  description: 'Follow-ups attached to CRM records.',
629
664
  schemaName: 'Task',
630
665
  required: [
@@ -677,6 +712,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
677
712
  method: 'get',
678
713
  operationId: 'listTasks',
679
714
  summary: 'List tasks',
715
+ description: 'Lists the workspace’s CRM tasks. Filter by status, assignee, contact or deal.',
680
716
  list: true,
681
717
  returns: 'Task',
682
718
  entitlement: 'crm',
@@ -692,17 +728,22 @@ export const CRM_API_V1_DESCRIPTIONS = {
692
728
  path: '/v1/tasks',
693
729
  method: 'post',
694
730
  operationId: 'createTask',
695
- summary: 'Create a task',
731
+ summary: 'Add a task',
732
+ description: 'Creates a task, such as a follow-up, with a `title` and optionally a due date, a reminder and the contact, company or deal it is about. Returns the new task.',
696
733
  accepts: 'TaskWrite',
697
734
  returns: 'Task',
698
735
  entitlement: 'crm',
699
- creates: true
736
+ creates: true,
737
+ bodyRequires: [
738
+ 'title'
739
+ ]
700
740
  },
701
741
  {
702
742
  path: '/v1/tasks/{taskId}',
703
743
  method: 'get',
704
744
  operationId: 'getTask',
705
- summary: 'Retrieve a task',
745
+ summary: 'Get a task',
746
+ description: 'Returns one task. Needs `taskId` from List tasks.',
706
747
  returns: 'Task',
707
748
  entitlement: 'crm',
708
749
  pathParams: [
@@ -717,6 +758,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
717
758
  method: 'patch',
718
759
  operationId: 'updateTask',
719
760
  summary: 'Update a task',
761
+ description: 'Changes a task, including marking it done; fields not sent stay as they are. Needs `taskId` from List tasks. Returns the updated task.',
720
762
  accepts: 'TaskWrite',
721
763
  returns: 'Task',
722
764
  entitlement: 'crm',
@@ -732,6 +774,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
732
774
  method: 'delete',
733
775
  operationId: 'deleteTask',
734
776
  summary: 'Delete a task',
777
+ description: 'Deletes a task permanently. Needs `taskId` from List tasks.',
735
778
  returns: 'Deleted',
736
779
  entitlement: 'crm',
737
780
  pathParams: [
@@ -745,6 +788,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
745
788
  },
746
789
  activities: {
747
790
  tag: 'Activities',
791
+ docsPage: 'activities',
748
792
  description: 'Logged interactions. Append-only: no PATCH.',
749
793
  schemaName: 'Activity',
750
794
  required: [
@@ -794,6 +838,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
794
838
  method: 'get',
795
839
  operationId: 'listActivities',
796
840
  summary: 'List activities',
841
+ description: 'Lists the calls, emails, meetings and notes logged in the CRM. Filter by kind, contact or deal.',
797
842
  list: true,
798
843
  returns: 'Activity',
799
844
  entitlement: 'crm',
@@ -809,6 +854,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
809
854
  method: 'post',
810
855
  operationId: 'createActivity',
811
856
  summary: 'Log an activity',
857
+ description: 'Records a call, email, meeting or note against a contact, company or deal. Needs the activity’s text in `body`. Returns the logged activity. Logging an email records it; it does not send one.',
812
858
  accepts: 'ActivityWrite',
813
859
  returns: 'Activity',
814
860
  entitlement: 'crm',
@@ -818,7 +864,8 @@ export const CRM_API_V1_DESCRIPTIONS = {
818
864
  path: '/v1/activities/{activityId}',
819
865
  method: 'get',
820
866
  operationId: 'getActivity',
821
- summary: 'Retrieve an activity',
867
+ summary: 'Get an activity',
868
+ description: 'Returns one logged activity. Needs `activityId` from List activities.',
822
869
  returns: 'Activity',
823
870
  entitlement: 'crm',
824
871
  pathParams: [
@@ -833,6 +880,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
833
880
  method: 'delete',
834
881
  operationId: 'deleteActivity',
835
882
  summary: 'Delete an activity',
883
+ description: 'Deletes a logged activity permanently. Needs `activityId` from List activities.',
836
884
  returns: 'Deleted',
837
885
  entitlement: 'crm',
838
886
  pathParams: [
@@ -846,6 +894,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
846
894
  },
847
895
  leads: {
848
896
  tag: 'Leads',
897
+ docsPage: 'leads',
849
898
  description: 'Unqualified interest, before it becomes a contact. A lead is a record of its own: the person and their company as text, until converting makes the contact and the company.',
850
899
  schemaName: 'Lead',
851
900
  required: [
@@ -937,33 +986,42 @@ export const CRM_API_V1_DESCRIPTIONS = {
937
986
  path: '/v1/leads',
938
987
  method: 'get',
939
988
  operationId: 'listLeads',
940
- summary: 'List leads',
989
+ summary: 'List a site’s leads',
990
+ description: 'Lists the leads one site has captured, not yet converted into contacts. Needs `siteId` from List sites. Filter by status or owner.',
941
991
  list: true,
942
992
  returns: 'Lead',
943
993
  entitlement: 'crm',
944
994
  filters: [
945
995
  UPDATED_AFTER_PARAM,
946
- queryParam('siteId', 'Site the lead arrived on.'),
996
+ LEAD_SITE_PARAM,
947
997
  queryParam('status', 'Lead status.'),
948
998
  queryParam('ownerUid', 'Owning user.')
949
999
  ]
950
1000
  },
1001
+ // openWorld: after saving, the address’s mail domain is looked up (DNS) to flag addresses that would bounce.
951
1002
  {
952
1003
  path: '/v1/leads',
953
1004
  method: 'post',
954
1005
  operationId: 'createLead',
955
- summary: 'Create a lead',
1006
+ summary: 'Add a lead to a site',
956
1007
  accepts: 'LeadWrite',
957
1008
  returns: 'Lead',
958
1009
  entitlement: 'crm',
959
1010
  creates: true,
960
- description: 'A lead sourced outside the site, entered before anyone has qualified it. One address is one lead per site: creating one the site already holds updates it and answers 200. No contact and no company are created — converting the lead does that — and no marketing consent is recorded.'
1011
+ description: 'Adds a lead to one site. Needs `siteId` from List sites and the lead’s `email`. One email is one lead per site: adding an address the site already holds updates that lead. No contact is created until the lead is converted. Returns the lead.',
1012
+ idempotent: true,
1013
+ openWorld: true,
1014
+ bodyRequires: [
1015
+ 'siteId',
1016
+ 'email'
1017
+ ]
961
1018
  },
962
1019
  {
963
1020
  path: '/v1/leads/{leadId}',
964
1021
  method: 'get',
965
1022
  operationId: 'getLead',
966
- summary: 'Retrieve a lead',
1023
+ summary: 'Get a lead',
1024
+ description: 'Returns one lead. Needs `siteId` from List sites and `leadId` from List a site’s leads.',
967
1025
  returns: 'Lead',
968
1026
  entitlement: 'crm',
969
1027
  pathParams: [
@@ -971,6 +1029,9 @@ export const CRM_API_V1_DESCRIPTIONS = {
971
1029
  name: 'leadId',
972
1030
  description: 'Lead id.'
973
1031
  }
1032
+ ],
1033
+ filters: [
1034
+ LEAD_SITE_PARAM
974
1035
  ]
975
1036
  },
976
1037
  {
@@ -978,6 +1039,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
978
1039
  method: 'patch',
979
1040
  operationId: 'updateLead',
980
1041
  summary: 'Update a lead',
1042
+ description: 'Changes a lead, including its status; fields not sent stay as they are. Needs `siteId` from List sites and `leadId` from List a site’s leads. Returns the updated lead.',
981
1043
  accepts: 'LeadWrite',
982
1044
  returns: 'Lead',
983
1045
  entitlement: 'crm',
@@ -986,28 +1048,68 @@ export const CRM_API_V1_DESCRIPTIONS = {
986
1048
  name: 'leadId',
987
1049
  description: 'Lead id.'
988
1050
  }
1051
+ ],
1052
+ filters: [
1053
+ LEAD_SITE_PARAM
989
1054
  ]
990
1055
  },
1056
+ // openWorld: the contact it creates has its mail domain looked up (DNS) to flag addresses that would bounce.
991
1057
  {
992
1058
  path: '/v1/leads/{leadId}/convert',
993
1059
  method: 'post',
994
1060
  operationId: 'convertLead',
995
- summary: 'Convert a lead',
1061
+ summary: 'Convert a lead into a contact',
1062
+ accepts: 'LeadConvertRequest',
1063
+ bodyOptional: true,
996
1064
  returns: 'LeadConversion',
997
1065
  entitlement: 'crm',
998
- description: 'Creates a contact, and optionally a company and a deal. Idempotent on the lead: converting an already-converted lead returns the existing ids.',
1066
+ description: 'Turns a lead into a contact, joining an existing contact with the same email, and can also link or create a company and open a deal. Needs `siteId` from List sites and `leadId` from List a site’s leads. Converting a lead again returns the same ids.',
999
1067
  pathParams: [
1000
1068
  {
1001
1069
  name: 'leadId',
1002
1070
  description: 'Lead id.'
1003
1071
  }
1072
+ ],
1073
+ idempotent: true,
1074
+ openWorld: true,
1075
+ filters: [
1076
+ LEAD_SITE_PARAM
1004
1077
  ]
1005
1078
  }
1006
1079
  ],
1007
1080
  components: {
1081
+ LeadConvertRequest: {
1082
+ type: 'object',
1083
+ description: 'Optional. What else the conversion does besides creating the contact. ' + 'Leave it out to convert the lead into a contact alone.',
1084
+ properties: {
1085
+ company: {
1086
+ type: [
1087
+ 'object',
1088
+ 'null'
1089
+ ],
1090
+ description: 'A company for the contact: `{ "link": "<companyId>" }` to link one from List companies, ' + '`{ "create": { "name": "…", "domain": "…" } }` to add one (an existing company with that ' + 'name or domain is reused), or null for none.'
1091
+ },
1092
+ deal: {
1093
+ type: [
1094
+ 'object',
1095
+ 'null'
1096
+ ],
1097
+ description: 'A deal to open in the default pipeline: `{ "title": "…", "amountCents": 12500, "currency": ' + '"usd", "stageId": "…", "type": "…" }`. `title` is required; the rest is optional. Null for none.'
1098
+ },
1099
+ ownerUid: {
1100
+ type: 'string',
1101
+ description: 'Workspace member who owns the contact and the deal. Defaults to the lead’s owner.'
1102
+ },
1103
+ ownerEmail: {
1104
+ type: 'string',
1105
+ description: 'The owner by email address, instead of `ownerUid`.'
1106
+ }
1107
+ },
1108
+ additionalProperties: false
1109
+ },
1008
1110
  LeadConversion: {
1009
1111
  type: 'object',
1010
- description: 'What the conversion produced. Idempotent on the lead: converting an ' + 'already-converted lead returns the existing ids rather than creating ' + 'a second set.',
1112
+ description: 'What the conversion produced: the contact, and the company and deal ' + 'when it made or linked them. Converting the same lead again returns ' + 'the same ids.',
1011
1113
  properties: {
1012
1114
  object: {
1013
1115
  type: 'string',
@@ -1035,6 +1137,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
1035
1137
  },
1036
1138
  'email-templates': {
1037
1139
  tag: 'Email templates',
1140
+ docsPage: 'email-templates',
1038
1141
  description: 'Reusable email bodies.',
1039
1142
  schemaName: 'EmailTemplate',
1040
1143
  required: [
@@ -1072,6 +1175,7 @@ export const CRM_API_V1_DESCRIPTIONS = {
1072
1175
  method: 'get',
1073
1176
  operationId: 'listEmailTemplates',
1074
1177
  summary: 'List email templates',
1178
+ description: 'Lists the workspace’s saved email templates with their name, subject and kind.',
1075
1179
  list: true,
1076
1180
  returns: 'EmailTemplate',
1077
1181
  entitlement: 'crm',
@@ -1085,17 +1189,23 @@ export const CRM_API_V1_DESCRIPTIONS = {
1085
1189
  path: '/v1/email-templates',
1086
1190
  method: 'post',
1087
1191
  operationId: 'createEmailTemplate',
1088
- summary: 'Create a template',
1192
+ summary: 'Add an email template',
1193
+ description: 'Saves a reusable email with a `name`, a subject and the message in `body`. Saving a template sends nothing. Returns the new template.',
1089
1194
  accepts: 'EmailTemplateWrite',
1090
1195
  returns: 'EmailTemplate',
1091
1196
  entitlement: 'crm',
1092
- creates: true
1197
+ creates: true,
1198
+ bodyRequires: [
1199
+ 'name',
1200
+ 'body'
1201
+ ]
1093
1202
  },
1094
1203
  {
1095
1204
  path: '/v1/email-templates/{templateId}',
1096
1205
  method: 'get',
1097
1206
  operationId: 'getEmailTemplate',
1098
- summary: 'Retrieve a template',
1207
+ summary: 'Get an email template',
1208
+ description: 'Returns one email template. Needs `templateId` from List email templates.',
1099
1209
  returns: 'EmailTemplate',
1100
1210
  entitlement: 'crm',
1101
1211
  pathParams: [
@@ -1109,7 +1219,8 @@ export const CRM_API_V1_DESCRIPTIONS = {
1109
1219
  path: '/v1/email-templates/{templateId}',
1110
1220
  method: 'patch',
1111
1221
  operationId: 'updateEmailTemplate',
1112
- summary: 'Update a template',
1222
+ summary: 'Update an email template',
1223
+ description: 'Changes a template; fields not sent stay as they are. Needs `templateId` from List email templates. Returns the updated template.',
1113
1224
  accepts: 'EmailTemplateWrite',
1114
1225
  returns: 'EmailTemplate',
1115
1226
  entitlement: 'crm',
@@ -1124,7 +1235,8 @@ export const CRM_API_V1_DESCRIPTIONS = {
1124
1235
  path: '/v1/email-templates/{templateId}',
1125
1236
  method: 'delete',
1126
1237
  operationId: 'deleteEmailTemplate',
1127
- summary: 'Delete a template',
1238
+ summary: 'Delete an email template',
1239
+ description: 'Deletes a template permanently. Needs `templateId` from List email templates.',
1128
1240
  returns: 'Deleted',
1129
1241
  entitlement: 'crm',
1130
1242
  pathParams: [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../../libs/plugins/crm/src/lib/server/api-v1/openapi.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n type ApiV1ResourceDescription,\n booleanField,\n integerField,\n isoField,\n nullableField,\n objectKindField,\n openObjectField,\n postalAddressField,\n queryParam,\n RECORD_STAMPS,\n stringField,\n stringListField,\n UPDATED_AFTER_PARAM,\n} from '@aglyn/tenant-data-admin/server/api-v1-description'\n\n/**\n * The CRM's resources as the customer API's OpenAPI document describes them\n * (AGL-2733), keyed by the resource each describes — what the console's\n * builder turns into their paths, tags and schemas, and the MCP tools derive\n * from.\n *\n * Transcribed from the response examples in `apps/docs/api/resources/*.md`,\n * the customer-facing contract, as the platform's own resources are; each\n * write body lists its handler's own writable set. `api-v1-openapi.spec.ts`\n * holds the document to every endpoint the documentation promises.\n */\n/** How a company picklist field reads in the description (AGL-3514). */\nfunction companyPicklistNote(label: string, plural: string): string {\n return (\n `${label}: one of the organization's active ${plural} (CRM › Fields › Companies), matched ` +\n 'without regard to case. Any other value is refused with a 400 naming the values allowed; ' +\n 'the value a company already holds is kept even after it is deactivated.'\n )\n}\n\nexport const CRM_API_V1_DESCRIPTIONS: Readonly<Record<string, ApiV1ResourceDescription>> = {\n contacts: {\n tag: 'Contacts',\n description: 'People, organization-wide. Part of the CRM, which is included from Starter.',\n schemaName: 'Contact',\n required: ['id', 'object', 'email'],\n writable: [\n 'email', 'name', 'tags', 'notes', 'marketingConsent', 'consentSiteId', 'consentGroupId', 'custom',\n 'phone', 'jobTitle', 'companyId', 'address', 'ownerUid', 'lifecycleStage', 'mediaIds',\n 'leadSource',\n // Salesforce's standard contact fields (AGL-3515).\n 'salutation', 'firstName', 'lastName', 'department', 'mobilePhone', 'homePhone', 'otherPhone',\n 'fax', 'birthdate', 'assistantName', 'assistantPhone', 'reportsToContactId', 'otherAddress', 'doNotCall',\n ],\n writeOnly: {\n consentSiteId: stringField('The site this write is made on behalf of: where the person opted in, and whose profile the profile fields land on.'),\n consentGroupId: stringField('With `marketingConsent: true`: the consent group the person was shown when they opted in. The opt-in then covers every site of that group; without it, or when the site is no longer in that group, it covers `consentSiteId` alone.'),\n custom: openObjectField('Contact custom fields, keyed by field key.'),\n mediaIds: stringListField('Media library files attached by the named site, by id, at most 20. An empty array clears them.'),\n },\n writeNote: 'A create needs an `email`, a `name`, a `phone`, a `mobilePhone`, or a `firstName` or `lastName`. `email` is accepted on create only — a `PATCH` that names it is a `400`, because a contact is identified by its email.',\n fields: {\n id: stringField('Contact id.'),\n object: objectKindField('contact'),\n email: nullableField(\n stringField('Primary email, unique per organization, or `null` for a contact with no address yet.'),\n ),\n name: stringField('Display name.'),\n tags: stringListField('Free-form tags.'),\n notes: stringField('Free-form notes.'),\n marketingConsent: booleanField('Whether the contact accepted marketing email.'),\n consentSites: stringListField('Site ids the consent was given on.'),\n sources: stringListField('Where this contact came from.'),\n phone: stringField('Telephone number.'),\n jobTitle: stringField('Job title.'),\n companyId: nullableField(stringField('Primary company.')),\n address: postalAddressField(),\n ownerUid: nullableField(stringField('Owning user. Checked on the page, not the query.')),\n lifecycleStage: nullableField(stringField('CRM lifecycle stage.')),\n leadSource: nullableField(stringField('Lead source: one of the organization’s Lead source values (CRM › Fields › Leads), stored on the named site’s profile. A value the list does not hold is a `400` naming the values it allows.')),\n // Salesforce's standard contact fields (AGL-3515).\n salutation: nullableField(stringField(\"One of the organization's salutation values (Mr., Ms., Mrs., Dr., Prof. and its own).\")),\n firstName: nullableField(stringField('First name. With `lastName`, it makes the name the named site shows.')),\n lastName: nullableField(stringField('Last name.')),\n department: nullableField(stringField('Department.')),\n mobilePhone: nullableField(stringField('Mobile phone, E.164.')),\n homePhone: nullableField(stringField('Home phone, E.164.')),\n otherPhone: nullableField(stringField('Other phone, E.164.')),\n fax: nullableField(stringField('Fax, E.164.')),\n birthdate: nullableField(stringField('Birthdate, `YYYY-MM-DD`, never in the future.')),\n assistantName: nullableField(stringField(\"Assistant's name.\")),\n assistantPhone: nullableField(stringField(\"Assistant's phone, E.164.\")),\n reportsToContactId: nullableField(stringField('The contact this person reports to. Never the contact itself, and never one that already reports to it.')),\n otherAddress: nullableField(postalAddressField()),\n doNotCall: booleanField('The person asked not to be phoned.'),\n companyIds: stringListField('Every company this contact belongs to.'),\n alternateEmails: stringListField('Other addresses that resolve to this contact.'),\n ...RECORD_STAMPS,\n },\n ops: [\n {\n path: '/v1/contacts', method: 'get', operationId: 'listContacts', summary: 'List contacts', list: true, returns: 'Contact', entitlement: 'crm',\n description: 'Combining `email` with `tag` narrows on `email` and checks `tag` on the page, so pages can come back short. `lifecycleStage` and `ownerUid` live on a per-site profile and are ALWAYS checked on the page.',\n filters: [\n queryParam('email', 'Exact match, normalized the way the write path normalizes it. An unusable value is a 400.'),\n queryParam('tag', 'Checked on the page when combined with `email`.'),\n queryParam('lifecycleStage', 'Always checked on the page.'),\n queryParam('ownerUid', 'Always checked on the page.'),\n ],\n },\n { path: '/v1/contacts', method: 'post', operationId: 'createContact', summary: 'Create a contact', accepts: 'ContactWrite', returns: 'Contact', entitlement: 'crm', creates: true, description: 'A duplicate email is `409 conflict` (`code: \"contact_exists\"`), and the message names the existing id.' },\n { path: '/v1/contacts/{contactId}', method: 'get', operationId: 'getContact', summary: 'Retrieve a contact', returns: 'Contact', entitlement: 'crm', pathParams: [{ name: 'contactId', description: 'Contact id.' }] },\n { path: '/v1/contacts/{contactId}', method: 'patch', operationId: 'updateContact', summary: 'Update a contact', accepts: 'ContactWrite', returns: 'Contact', entitlement: 'crm', pathParams: [{ name: 'contactId', description: 'Contact id.' }] },\n { path: '/v1/contacts/{contactId}', method: 'delete', operationId: 'deleteContact', summary: 'Delete a contact', returns: 'Deleted', entitlement: 'crm', pathParams: [{ name: 'contactId', description: 'Contact id.' }] },\n { path: '/v1/contacts/{contactId}/merge', method: 'post', operationId: 'mergeContact', summary: 'Merge two contacts', accepts: 'ContactMerge', returns: 'Contact', entitlement: 'crm', destructive: true, pathParams: [{ name: 'contactId', description: 'The contact that survives.' }] },\n ],\n components: {\n ContactMerge: {\n type: 'object',\n required: ['sourceContactId'],\n description:\n 'Merge another contact into this one. The source is removed. Any other ' +\n 'member is a `400`.',\n properties: {\n sourceContactId: {\n type: 'string',\n description:\n 'The contact to merge FROM. It does not survive, and it must not be ' +\n 'the contact in the path.',\n },\n },\n additionalProperties: false,\n },\n },\n },\n companies: {\n tag: 'Companies',\n description: 'Organizations in the CRM.',\n schemaName: 'Company',\n required: ['id', 'object', 'name'],\n writable: [\n 'name', 'domain', 'website', 'phone', 'address', 'industry', 'ownerUid', 'notes', 'custom', 'mediaIds', 'consentSiteId',\n // Salesforce's Account fields (AGL-3514).\n 'type', 'rating', 'ownership', 'accountSource', 'annualRevenueCents', 'currency', 'numberOfEmployees', 'fax',\n 'accountNumber', 'site', 'tickerSymbol', 'sicCode', 'shippingAddress', 'parentCompanyId',\n ],\n writeOnly: {\n mediaIds: stringListField('Media library files attached to this company, by id, at most 20. An empty array clears them.'),\n consentSiteId: stringField('The site the company is created on behalf of.'),\n },\n writeNote: 'A create needs `name` and `consentSiteId`; a `PATCH` that names `consentSiteId` is a `400`.',\n fields: {\n id: stringField('Company id.'),\n object: objectKindField('company'),\n name: stringField('Company name.'),\n domain: nullableField(stringField('Primary domain. Unique per organization.')),\n website: nullableField(stringField('Website URL.')),\n phone: nullableField(stringField('Telephone number.')),\n address: { ...postalAddressField(), description: 'Billing address. Members are optional and free-form.' },\n industry: nullableField(stringField(companyPicklistNote('Industry', 'industries'))),\n // Salesforce's Account fields (AGL-3514).\n type: nullableField(stringField(companyPicklistNote('Account type', 'types'))),\n rating: nullableField(stringField(companyPicklistNote('Rating', 'ratings'))),\n ownership: nullableField(stringField(companyPicklistNote('Ownership', 'ownership values'))),\n accountSource: nullableField(\n stringField(\n \"Where the account came from: one of the organization's active lead source values \" +\n '(CRM › Fields › Leads), matched without regard to case. Any other value is refused ' +\n 'with a 400 naming the values allowed; the value a company already holds is kept.',\n ),\n ),\n annualRevenueCents: nullableField(integerField('Annual revenue in the minor unit of `currency`, 0 or more.')),\n currency: stringField('Lowercase ISO 4217 code of the annual revenue. `usd` when unset.'),\n numberOfEmployees: nullableField(integerField('Number of employees, 0 to 99,999,999.')),\n fax: nullableField(stringField('E.164 fax number.')),\n accountNumber: nullableField(stringField('Account number, at most 40 characters.')),\n site: nullableField(stringField('Which of the company’s locations this record is, at most 80 characters.')),\n tickerSymbol: nullableField(stringField('Stock ticker symbol, at most 20 characters.')),\n sicCode: nullableField(stringField('Standard Industrial Classification code, at most 20 characters.')),\n shippingAddress: { ...postalAddressField(), description: 'Shipping address. Members are optional and free-form.' },\n parentCompanyId: nullableField(\n stringField('The company this one sits under. Never itself or a company below it; deleting the parent clears it.'),\n ),\n ownerUid: nullableField(stringField('Owning user.')),\n notes: nullableField(stringField('Free-form notes.')),\n custom: openObjectField('Customer-defined fields.'),\n nextTaskAt: nullableField(isoField('When the next open task on this company is due.')),\n siteId: nullableField(stringField('Site the record originated on.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/companies', method: 'get', operationId: 'listCompanies', summary: 'List companies', list: true, returns: 'Company', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM, queryParam('domain', 'Exact match.'), queryParam('ownerUid', 'Owning user.')] },\n { path: '/v1/companies', method: 'post', operationId: 'createCompany', summary: 'Create a company', accepts: 'CompanyWrite', returns: 'Company', entitlement: 'crm', creates: true, description: 'A duplicate domain is `409 conflict` (`code: \"company_exists\"`), naming the existing id.' },\n { path: '/v1/companies/{companyId}', method: 'get', operationId: 'getCompany', summary: 'Retrieve a company', returns: 'Company', entitlement: 'crm', pathParams: [{ name: 'companyId', description: 'Company id.' }] },\n { path: '/v1/companies/{companyId}', method: 'patch', operationId: 'updateCompany', summary: 'Update a company', accepts: 'CompanyWrite', returns: 'Company', entitlement: 'crm', pathParams: [{ name: 'companyId', description: 'Company id.' }] },\n { path: '/v1/companies/{companyId}', method: 'delete', operationId: 'deleteCompany', summary: 'Delete a company', returns: 'Deleted', entitlement: 'crm', pathParams: [{ name: 'companyId', description: 'Company id.' }] },\n ],\n },\n pipelines: {\n tag: 'Pipelines',\n description: 'Deal pipelines and their stages. Read-only over the API.',\n schemaName: 'Pipeline',\n required: ['id', 'object', 'name', 'stages'],\n fields: {\n id: stringField('Pipeline id.'),\n object: objectKindField('pipeline'),\n name: stringField('Pipeline name.'),\n isDefault: booleanField('Whether new deals land here when none is named.'),\n archived: booleanField('Whether the pipeline is archived.'),\n archivedAt: nullableField(isoField('When it was archived.')),\n stages: {\n type: 'array',\n description: 'Ordered stages. A deal’s `stageId` names one of these.',\n items: {\n type: 'object',\n properties: {\n id: { type: 'string' },\n name: { type: 'string' },\n order: { type: 'integer' },\n probability: { type: 'integer', description: 'Chance of closing from this stage, 0–100.' },\n kind: { type: 'string', enum: ['open', 'won', 'lost'] },\n forecastCategory: {\n type: 'string',\n enum: ['omitted', 'pipeline', 'bestCase', 'commit', 'closed'],\n description: 'The forecast category a deal takes on landing in this stage.',\n },\n },\n additionalProperties: true,\n },\n },\n siteId: nullableField(stringField('Site the pipeline belongs to, when scoped.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/pipelines', method: 'get', operationId: 'listPipelines', summary: 'List pipelines', list: true, returns: 'Pipeline', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM] },\n { path: '/v1/pipelines/{pipelineId}', method: 'get', operationId: 'getPipeline', summary: 'Retrieve a pipeline', returns: 'Pipeline', entitlement: 'crm', pathParams: [{ name: 'pipelineId', description: 'Pipeline id.' }] },\n ],\n },\n deals: {\n tag: 'Deals',\n description: 'Opportunities moving through a pipeline.',\n schemaName: 'Deal',\n required: ['id', 'object', 'title', 'pipelineId', 'stageId'],\n writable: ['title', 'pipelineId', 'stageId', 'status', 'amountCents', 'currency', 'lineItems', 'expectedCloseAt', 'ownerUid', 'contactId', 'companyId', 'lostReason', 'notes', 'custom', 'mediaIds', 'consentSiteId', 'type', 'leadSource', 'nextStep', 'probability', 'forecastCategory', 'campaignId', 'contactRoles'],\n writeOnly: {\n mediaIds: stringListField('Media library files attached to this deal, by id, at most 20. An empty array clears them.'),\n consentSiteId: stringField('The site the deal is created on behalf of.'),\n },\n writeNote:\n '`pipelineId` and `consentSiteId` are accepted on create only; a `PATCH` that names either is a `400`. ' +\n '`type` and `leadSource` must be active values of the organization’s lists (a deal keeps the value it holds). ' +\n 'A stage move sets `forecastCategory` from the new stage and clears `probability`, unless the same body sets them. ' +\n '`contactRoles` replaces the whole list: each contact once, at most 50, at most one `primary`, each `role` an active value of the organization’s contact roles. ' +\n 'The Primary is `contactId`: a body sending both must agree, and `contactId` alone makes that contact Primary.',\n fields: {\n id: stringField('Deal id.'),\n object: objectKindField('deal'),\n title: stringField('Deal title.'),\n pipelineId: stringField('Pipeline the deal sits in.'),\n stageId: stringField('Stage within that pipeline.'),\n status: stringField('`open`, `won` or `lost`.'),\n amountCents: integerField('Value in the smallest unit of `currency`.'),\n currency: stringField('ISO 4217 code.'),\n lineItems: { type: 'array', description: 'Line items, when the deal carries them.', items: { type: 'object', additionalProperties: true } },\n expectedCloseAt: nullableField(isoField('Forecast close date.')),\n closedAt: nullableField(isoField('When it was actually closed.')),\n stageChangedAt: nullableField(isoField('When the stage last moved.')),\n ownerUid: nullableField(stringField('Owning user.')),\n contactId: nullableField(stringField('Associated contact — the Primary of `contactRoles`.')),\n contactRoles: {\n type: 'array',\n description:\n 'Every contact on the deal and the part each plays (Salesforce’s Opportunity Contact Roles). At most one is `primary`, and it is `contactId`.',\n items: {\n type: 'object',\n required: ['contactId', 'primary'],\n properties: {\n contactId: stringField('The contact.'),\n role: nullableField(stringField('One of the organization’s contact roles (Decision Maker, Evaluator, …), or `null` for none.')),\n primary: booleanField('Whether this is the deal’s Primary contact.'),\n },\n },\n },\n companyId: nullableField(stringField('Associated company.')),\n lostReason: nullableField(stringField('Why it was lost.')),\n notes: nullableField(stringField('Free-form notes.')),\n type: nullableField(stringField('Type — one of the organization’s deal types (New Business, Existing Business, …).')),\n leadSource: nullableField(stringField('Lead source — one of the organization’s lead sources.')),\n nextStep: nullableField(stringField('What happens next. At most 255 characters.')),\n probability: nullableField(integerField('This deal’s own chance of closing, 0–100; `null` uses its stage’s. A stage move clears it.')),\n forecastCategory: nullableField(stringField('`omitted`, `pipeline`, `bestCase`, `commit` or `closed`. Every stage move sets it from the new stage.')),\n campaignId: nullableField(stringField('The campaign the deal is attributed to.')),\n custom: openObjectField('Customer-defined fields.'),\n nextTaskAt: nullableField(isoField('When the next open task on this deal is due.')),\n siteId: nullableField(stringField('Site the record originated on.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/deals', method: 'get', operationId: 'listDeals', summary: 'List deals', list: true, returns: 'Deal', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM, queryParam('pipelineId', 'Pipeline.'), queryParam('stageId', 'Stage.'), queryParam('status', 'Deal status.'), queryParam('ownerUid', 'Owning user.'), queryParam('type', 'Type, exactly as stored.'), queryParam('leadSource', 'Lead source, exactly as stored.'), queryParam('forecastCategory', 'Forecast category.'), queryParam('campaignId', 'Campaign.')] },\n { path: '/v1/deals', method: 'post', operationId: 'createDeal', summary: 'Create a deal', accepts: 'DealWrite', returns: 'Deal', entitlement: 'crm', creates: true },\n { path: '/v1/deals/{dealId}', method: 'get', operationId: 'getDeal', summary: 'Retrieve a deal', returns: 'Deal', entitlement: 'crm', pathParams: [{ name: 'dealId', description: 'Deal id.' }] },\n { path: '/v1/deals/{dealId}', method: 'patch', operationId: 'updateDeal', summary: 'Update a deal', accepts: 'DealWrite', returns: 'Deal', entitlement: 'crm', pathParams: [{ name: 'dealId', description: 'Deal id.' }] },\n { path: '/v1/deals/{dealId}', method: 'delete', operationId: 'deleteDeal', summary: 'Delete a deal', returns: 'Deleted', entitlement: 'crm', pathParams: [{ name: 'dealId', description: 'Deal id.' }] },\n ],\n },\n tasks: {\n tag: 'Tasks',\n description: 'Follow-ups attached to CRM records.',\n schemaName: 'Task',\n required: ['id', 'object', 'title'],\n writable: ['title', 'notes', 'kind', 'priority', 'status', 'dueAt', 'remindAt', 'assigneeUid', 'contactId', 'companyId', 'dealId', 'consentSiteId'],\n writeOnly: {\n consentSiteId: stringField('The site the task is created on behalf of.'),\n },\n writeNote: 'A create needs `title` and `consentSiteId`; a `PATCH` that names `consentSiteId` is a `400`.',\n fields: {\n id: stringField('Task id.'),\n object: objectKindField('task'),\n title: stringField('Task title.'),\n notes: nullableField(stringField('Free-form notes.')),\n kind: stringField('Task type as its meaning: `call`, `email`, `meeting` or `todo`. A write takes the meaning or a label of the Type picklist.'),\n typeLabel: stringField('The organization’s Type picklist label, e.g. `Call`. Read-only; set through `kind`.'),\n priority: stringField('`low`, `normal` or `high`. A write takes the meaning or a label of the Priority picklist.'),\n priorityLabel: stringField('The organization’s Priority picklist label, e.g. `High`. Read-only; set through `priority`.'),\n status: stringField('`open` or `done`. A write takes the meaning or a label of the Status picklist, e.g. `In Progress`.'),\n statusLabel: stringField('The organization’s Status picklist label, e.g. `Not Started`. Read-only; set through `status`.'),\n dueAt: nullableField(isoField('When the task is due.')),\n remindAt: nullableField(isoField('When a reminder is scheduled.')),\n reminderSentAt: nullableField(isoField('When the reminder was sent.')),\n completedAt: nullableField(isoField('When it was completed.')),\n assigneeUid: nullableField(stringField('Assigned user.')),\n contactId: nullableField(stringField('Associated contact.')),\n companyId: nullableField(stringField('Associated company.')),\n dealId: nullableField(stringField('Associated deal.')),\n siteId: nullableField(stringField('Site the record originated on.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/tasks', method: 'get', operationId: 'listTasks', summary: 'List tasks', list: true, returns: 'Task', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM, queryParam('status', 'Task status.'), queryParam('assigneeUid', 'Assigned user.'), queryParam('contactId', 'Associated contact.'), queryParam('dealId', 'Associated deal.')] },\n { path: '/v1/tasks', method: 'post', operationId: 'createTask', summary: 'Create a task', accepts: 'TaskWrite', returns: 'Task', entitlement: 'crm', creates: true },\n { path: '/v1/tasks/{taskId}', method: 'get', operationId: 'getTask', summary: 'Retrieve a task', returns: 'Task', entitlement: 'crm', pathParams: [{ name: 'taskId', description: 'Task id.' }] },\n { path: '/v1/tasks/{taskId}', method: 'patch', operationId: 'updateTask', summary: 'Update a task', accepts: 'TaskWrite', returns: 'Task', entitlement: 'crm', pathParams: [{ name: 'taskId', description: 'Task id.' }] },\n { path: '/v1/tasks/{taskId}', method: 'delete', operationId: 'deleteTask', summary: 'Delete a task', returns: 'Deleted', entitlement: 'crm', pathParams: [{ name: 'taskId', description: 'Task id.' }] },\n ],\n },\n activities: {\n tag: 'Activities',\n description: 'Logged interactions. Append-only: no PATCH.',\n schemaName: 'Activity',\n required: ['id', 'object', 'kind', 'at'],\n writable: ['kind', 'body', 'at', 'byUid', 'contactId', 'companyId', 'dealId', 'outcome', 'durationMinutes', 'direction', 'consentSiteId'],\n writeOnly: {\n consentSiteId: stringField('The site the activity is logged on behalf of.'),\n },\n writeRequired: ['body', 'consentSiteId'],\n fields: {\n id: stringField('Activity id.'),\n object: objectKindField('activity'),\n kind: stringField('What happened, e.g. `call`, `email`, `note`.'),\n body: stringField('Free-form body.'),\n at: isoField('When the interaction happened — not when it was logged.'),\n byUid: nullableField(stringField('User who logged it.')),\n contactId: nullableField(stringField('Associated contact.')),\n companyId: nullableField(stringField('Associated company. When none is sent, the company of the deal, else of the contact.')),\n dealId: nullableField(stringField('Associated deal.')),\n outcome: nullableField(stringField('Outcome label.')),\n durationMinutes: nullableField(integerField('Duration, for calls and meetings.')),\n direction: nullableField(stringField('Which way it went: `inbound`, `outbound` or `internal` for a call, `inbound` or `outbound` for an email.')),\n siteId: nullableField(stringField('Site the record originated on.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/activities', method: 'get', operationId: 'listActivities', summary: 'List activities', list: true, returns: 'Activity', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM, queryParam('kind', 'Activity kind.'), queryParam('contactId', 'Associated contact.'), queryParam('dealId', 'Associated deal.')] },\n { path: '/v1/activities', method: 'post', operationId: 'createActivity', summary: 'Log an activity', accepts: 'ActivityWrite', returns: 'Activity', entitlement: 'crm', creates: true },\n { path: '/v1/activities/{activityId}', method: 'get', operationId: 'getActivity', summary: 'Retrieve an activity', returns: 'Activity', entitlement: 'crm', pathParams: [{ name: 'activityId', description: 'Activity id.' }] },\n { path: '/v1/activities/{activityId}', method: 'delete', operationId: 'deleteActivity', summary: 'Delete an activity', returns: 'Deleted', entitlement: 'crm', pathParams: [{ name: 'activityId', description: 'Activity id.' }] },\n ],\n },\n leads: {\n tag: 'Leads',\n description: 'Unqualified interest, before it becomes a contact. A lead is a record of its own: the person and their company as text, until converting makes the contact and the company.',\n schemaName: 'Lead',\n required: ['id', 'object', 'siteId'],\n writable: [\n 'siteId', 'email', 'name', 'status', 'ownerUid', 'ownerEmail', 'notes', 'unqualifiedReason', 'company', 'jobTitle', 'phone', 'website', 'address', 'tags', 'leadSource',\n // Salesforce's standard lead fields (AGL-3513).\n 'salutation', 'firstName', 'lastName', 'mobilePhone', 'fax', 'doNotCall', 'industry', 'rating', 'annualRevenueCents', 'currency', 'numberOfEmployees',\n ],\n writeNote: '`email` and `name` are taken on a create only; a `PATCH` cannot change the address, which is the lead’s identity within its site. While `firstName` or `lastName` is set, `name` is their composition, \"First Last\", and follows them.',\n writeRequired: ['email'],\n writeOnly: {\n siteId: stringField('The site the lead belongs to, instead of the `siteId` query parameter.'),\n status: stringField('One of the organization’s active lead status values by its label (CRM › Fields › Leads), or a meaning — `new`, `nurturing`, `working` or `unqualified` (`nurturing` and `unqualified` on a `PATCH` only). Stored as the meaning and the label together. A lead becomes `qualified` by being converted.'),\n ownerEmail: stringField('A member’s address, resolved against the organization’s roster. Not with `ownerUid` in the same request.'),\n },\n fields: {\n id: stringField('Lead id.'),\n object: objectKindField('lead'),\n siteId: stringField('Site the lead arrived on.'),\n email: nullableField(stringField('Email — the lead’s identity within its site.')),\n name: nullableField(stringField('Name, when supplied.')),\n status: stringField('What the lead status means: `new`, `nurturing`, `working`, `qualified` or `unqualified`. What every filter and automation reads.'),\n statusLabel: stringField('The organization’s label for the lead status value the lead holds — one of `status`’s meaning. Read-only; set it through `status`.'),\n ownerUid: nullableField(stringField('Owning user.')),\n notes: nullableField(stringField('Free-form notes.')),\n unqualifiedReason: nullableField(stringField('Why the lead was disqualified.')),\n company: nullableField(stringField('The company’s name, as text. Converting the lead is what links or creates the company record.')),\n jobTitle: nullableField(stringField('Job title.')),\n phone: nullableField(stringField('E.164 phone number.')),\n website: nullableField(stringField('An http(s) URL.')),\n address: nullableField(postalAddressField()),\n tags: stringListField('Lower-cased tags.'),\n leadSource: nullableField(\n stringField(\n \"Where the lead came from: one of the organization's active lead source values \" +\n '(CRM › Fields › Leads), matched without regard to case. Any other value is refused ' +\n 'with a 400 naming the values allowed; the value a lead already holds is kept even ' +\n \"after it is deactivated. A create that names none starts from the list's default.\",\n ),\n ),\n // Salesforce's standard lead fields (AGL-3513).\n salutation: nullableField(stringField('Salutation: one of the organization’s active Salutation values (CRM › Fields › Contacts), matched without regard to case. Any other value is a `400` naming the values allowed; the value a lead already holds is kept.')),\n firstName: nullableField(stringField('First name, at most 59 characters. While it or `lastName` is set, `name` is \"First Last\".')),\n lastName: nullableField(stringField('Last name, at most 59 characters.')),\n mobilePhone: nullableField(stringField('E.164 mobile phone number.')),\n fax: nullableField(stringField('E.164 fax number.')),\n doNotCall: booleanField('The person asked not to be phoned. A hint on every call control, never a block. `false` clears it.'),\n industry: nullableField(stringField('Industry: one of the organization’s active Industry values (CRM › Fields › Companies) — the list companies keep, so converting carries it. Any other value is a `400` naming the values allowed; the value a lead already holds is kept.')),\n rating: nullableField(stringField('Rating: one of the organization’s active Rating values (CRM › Fields › Companies). Any other value is a `400` naming the values allowed.')),\n annualRevenueCents: nullableField(integerField('Annual revenue in the minor unit of `currency`, 0 or more.')),\n currency: stringField('Lowercase ISO 4217 code of the annual revenue. `usd` when unset.'),\n numberOfEmployees: nullableField(integerField('Number of employees, 0 to 99,999,999.')),\n sources: stringListField('The surfaces that captured the lead: `signup`, `booking`, `form:{formId}`, `import`, `manual`, `api`.'),\n submissionCount: integerField('How many form submissions this lead has made.'),\n firstSeen: isoField('First interaction.'),\n lastSeen: isoField('Most recent interaction.'),\n marketingConsent: booleanField('Whether marketing consent was given.'),\n marketingConsentAt: nullableField(isoField('When consent was given.')),\n convertedContactId: nullableField(stringField('Contact created by conversion.')),\n convertedAt: nullableField(isoField('When it was converted.')),\n companyId: nullableField(stringField('Company created or matched by conversion.')),\n dealId: nullableField(stringField('Deal created by conversion.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/leads', method: 'get', operationId: 'listLeads', summary: 'List leads', list: true, returns: 'Lead', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM, queryParam('siteId', 'Site the lead arrived on.'), queryParam('status', 'Lead status.'), queryParam('ownerUid', 'Owning user.')] },\n { path: '/v1/leads', method: 'post', operationId: 'createLead', summary: 'Create a lead', accepts: 'LeadWrite', returns: 'Lead', entitlement: 'crm', creates: true, description: 'A lead sourced outside the site, entered before anyone has qualified it. One address is one lead per site: creating one the site already holds updates it and answers 200. No contact and no company are created — converting the lead does that — and no marketing consent is recorded.' },\n { path: '/v1/leads/{leadId}', method: 'get', operationId: 'getLead', summary: 'Retrieve a lead', returns: 'Lead', entitlement: 'crm', pathParams: [{ name: 'leadId', description: 'Lead id.' }] },\n { path: '/v1/leads/{leadId}', method: 'patch', operationId: 'updateLead', summary: 'Update a lead', accepts: 'LeadWrite', returns: 'Lead', entitlement: 'crm', pathParams: [{ name: 'leadId', description: 'Lead id.' }] },\n { path: '/v1/leads/{leadId}/convert', method: 'post', operationId: 'convertLead', summary: 'Convert a lead', returns: 'LeadConversion', entitlement: 'crm', description: 'Creates a contact, and optionally a company and a deal. Idempotent on the lead: converting an already-converted lead returns the existing ids.', pathParams: [{ name: 'leadId', description: 'Lead id.' }] },\n ],\n components: {\n LeadConversion: {\n type: 'object',\n description:\n 'What the conversion produced. Idempotent on the lead: converting an ' +\n 'already-converted lead returns the existing ids rather than creating ' +\n 'a second set.',\n properties: {\n object: { type: 'string', const: 'lead_conversion' },\n contactId: { type: 'string' },\n companyId: { type: ['string', 'null'] },\n dealId: { type: ['string', 'null'] },\n },\n additionalProperties: true,\n },\n },\n },\n 'email-templates': {\n tag: 'Email templates',\n description: 'Reusable email bodies.',\n schemaName: 'EmailTemplate',\n required: ['id', 'object', 'name'],\n writable: ['name', 'kind', 'visibility', 'ownerUid', 'subject', 'body', 'consentSiteId'],\n writeOnly: {\n consentSiteId: stringField('The site the template is created on behalf of.'),\n },\n writeNote: 'A create needs `name`, `body` and `consentSiteId`; a `PATCH` that names `consentSiteId` is a `400`.',\n fields: {\n id: stringField('Template id.'),\n object: objectKindField('email_template'),\n name: stringField('Template name.'),\n kind: stringField('Template kind.'),\n visibility: stringField('`org` or `private`.'),\n ownerUid: nullableField(stringField('Owner, for a private template.')),\n subject: stringField('Subject line.'),\n body: stringField('Body. May contain merge tokens.'),\n siteId: nullableField(stringField('Site the template belongs to, when scoped.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/email-templates', method: 'get', operationId: 'listEmailTemplates', summary: 'List email templates', list: true, returns: 'EmailTemplate', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM, queryParam('kind', 'Template kind.'), queryParam('visibility', 'Visibility.')] },\n { path: '/v1/email-templates', method: 'post', operationId: 'createEmailTemplate', summary: 'Create a template', accepts: 'EmailTemplateWrite', returns: 'EmailTemplate', entitlement: 'crm', creates: true },\n { path: '/v1/email-templates/{templateId}', method: 'get', operationId: 'getEmailTemplate', summary: 'Retrieve a template', returns: 'EmailTemplate', entitlement: 'crm', pathParams: [{ name: 'templateId', description: 'Template id.' }] },\n { path: '/v1/email-templates/{templateId}', method: 'patch', operationId: 'updateEmailTemplate', summary: 'Update a template', accepts: 'EmailTemplateWrite', returns: 'EmailTemplate', entitlement: 'crm', pathParams: [{ name: 'templateId', description: 'Template id.' }] },\n { path: '/v1/email-templates/{templateId}', method: 'delete', operationId: 'deleteEmailTemplate', summary: 'Delete a template', returns: 'Deleted', entitlement: 'crm', pathParams: [{ name: 'templateId', description: 'Template id.' }] },\n ],\n },\n}\n"],"names":["booleanField","integerField","isoField","nullableField","objectKindField","openObjectField","postalAddressField","queryParam","RECORD_STAMPS","stringField","stringListField","UPDATED_AFTER_PARAM","companyPicklistNote","label","plural","CRM_API_V1_DESCRIPTIONS","contacts","tag","description","schemaName","required","writable","writeOnly","consentSiteId","consentGroupId","custom","mediaIds","writeNote","fields","id","object","email","name","tags","notes","marketingConsent","consentSites","sources","phone","jobTitle","companyId","address","ownerUid","lifecycleStage","leadSource","salutation","firstName","lastName","department","mobilePhone","homePhone","otherPhone","fax","birthdate","assistantName","assistantPhone","reportsToContactId","otherAddress","doNotCall","companyIds","alternateEmails","ops","path","method","operationId","summary","list","returns","entitlement","filters","accepts","creates","pathParams","destructive","components","ContactMerge","type","properties","sourceContactId","additionalProperties","companies","domain","website","industry","rating","ownership","accountSource","annualRevenueCents","currency","numberOfEmployees","accountNumber","site","tickerSymbol","sicCode","shippingAddress","parentCompanyId","nextTaskAt","siteId","pipelines","isDefault","archived","archivedAt","stages","items","order","probability","kind","enum","forecastCategory","deals","title","pipelineId","stageId","status","amountCents","lineItems","expectedCloseAt","closedAt","stageChangedAt","contactId","contactRoles","role","primary","lostReason","nextStep","campaignId","tasks","typeLabel","priority","priorityLabel","statusLabel","dueAt","remindAt","reminderSentAt","completedAt","assigneeUid","dealId","activities","writeRequired","body","at","byUid","outcome","durationMinutes","direction","leads","ownerEmail","unqualifiedReason","company","submissionCount","firstSeen","lastSeen","marketingConsentAt","convertedContactId","convertedAt","LeadConversion","const","visibility","subject"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAEEA,YAAY,EACZC,YAAY,EACZC,QAAQ,EACRC,aAAa,EACbC,eAAe,EACfC,eAAe,EACfC,kBAAkB,EAClBC,UAAU,EACVC,aAAa,EACbC,WAAW,EACXC,eAAe,EACfC,mBAAmB,QACd,qDAAoD;AAE3D;;;;;;;;;;CAUC,GACD,sEAAsE,GACtE,SAASC,oBAAoBC,KAAa,EAAEC,MAAc;IACxD,OACE,GAAGD,MAAM,mCAAmC,EAAEC,OAAO,qCAAqC,CAAC,GAC3F,8FACA;AAEJ;AAEA,OAAO,MAAMC,0BAA8E;IACzFC,UAAU;QACRC,KAAK;QACLC,aAAa;QACbC,YAAY;QACZC,UAAU;YAAC;YAAM;YAAU;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AAEuD,MAAM;gBAAuBC,QAAQ;gBAAQC,aAAa;gBAAuBC,SAAS;gBAAqBK,SAAS;gBAAsBH,SAAS;gBAAiBC,aAAa;gBAAOG,SAAS;YAAK;YAC5M;gBAAET,MAAM;gBAAoCC,QAAQ;gBAAOC,aAAa;gBAAoBC,SAAS;gBAAuBE,SAAS;gBAAiBC,aAAa;gBAAOI,YAAY;oBAAC;wBAAExC,MAAM;wBAAcd,aAAa;oBAAe;iBAAE;YAAC;YAC5O;gBAAE4C,MAAM;gBAAoCC,QAAQ;gBAASC,aAAa;gBAAuBC,SAAS;gBAAqBK,SAAS;gBAAsBH,SAAS;gBAAiBC,aAAa;gBAAOI,YAAY;oBAAC;wBAAExC,MAAM;wBAAcd,aAAa;oBAAe;iBAAE;YAAC;YAC9Q;gBAAE4C,MAAM;gBAAoCC,QAAQ;gBAAUC,aAAa;gBAAuBC,SAAS;gBAAqBE,SAAS;gBAAWC,aAAa;gBAAOI,YAAY;oBAAC;wBAAExC,MAAM;wBAAcd,aAAa;oBAAe;iBAAE;YAAC;SAC3O;IACH;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../../../../libs/plugins/crm/src/lib/server/api-v1/openapi.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n type ApiV1ResourceDescription,\n booleanField,\n integerField,\n isoField,\n nullableField,\n objectKindField,\n openObjectField,\n postalAddressField,\n queryParam,\n requiredQueryParam,\n RECORD_STAMPS,\n stringField,\n stringListField,\n UPDATED_AFTER_PARAM,\n} from '@aglyn/tenant-data-admin/server/api-v1-description'\n\n/**\n * The CRM's resources as the customer API's OpenAPI document describes them\n * (AGL-2733), keyed by the resource each describes — what the console's\n * builder turns into their paths, tags and schemas, and the MCP tools derive\n * from.\n *\n * Transcribed from the response examples in `apps/docs/api/resources/*.md`,\n * the customer-facing contract, as the platform's own resources are; each\n * write body lists its handler's own writable set. `api-v1-openapi.spec.ts`\n * holds the document to every endpoint the documentation promises.\n */\n/** How a company picklist field reads in the description (AGL-3514). */\nfunction companyPicklistNote(label: string, plural: string): string {\n return (\n `${label}: one of the organization's active ${plural} (CRM › Fields › Companies), matched ` +\n 'without regard to case. Any other value is refused with a 400 naming the values allowed; ' +\n 'the value a company already holds is kept even after it is deactivated.'\n )\n}\n\n\n/**\n * The site a lead belongs to (AGL-4225). A lead is a site's record and its id\n * is unique only within the site, so the handler refuses every lead request\n * without one — and until this was declared, a client reading the document\n * could not know to send it.\n */\nconst LEAD_SITE_PARAM = requiredQueryParam(\n 'siteId',\n 'Required. The site the lead belongs to — the `id` of a site from `listSites`.',\n)\n\nexport const CRM_API_V1_DESCRIPTIONS: Readonly<Record<string, ApiV1ResourceDescription>> = {\n contacts: {\n tag: 'Contacts',\n docsPage: 'contacts',\n description: 'People, organization-wide. Part of the CRM, which is included from Starter.',\n schemaName: 'Contact',\n required: ['id', 'object', 'email'],\n writable: [\n 'email', 'name', 'tags', 'notes', 'marketingConsent', 'consentSiteId', 'consentGroupId', 'custom',\n 'phone', 'jobTitle', 'companyId', 'address', 'ownerUid', 'lifecycleStage', 'mediaIds',\n 'leadSource',\n // Salesforce's standard contact fields (AGL-3515).\n 'salutation', 'firstName', 'lastName', 'department', 'mobilePhone', 'homePhone', 'otherPhone',\n 'fax', 'birthdate', 'assistantName', 'assistantPhone', 'reportsToContactId', 'otherAddress', 'doNotCall',\n ],\n writeOnly: {\n consentSiteId: stringField('The site this write is made on behalf of: where the person opted in, and whose profile the profile fields land on.'),\n consentGroupId: stringField('With `marketingConsent: true`: the consent group the person was shown when they opted in. The opt-in then covers every site of that group; without it, or when the site is no longer in that group, it covers `consentSiteId` alone.'),\n custom: openObjectField('Contact custom fields, keyed by field key.'),\n mediaIds: stringListField('Media library files attached by the named site, by id, at most 20. An empty array clears them.'),\n },\n writeNote: 'A create needs an `email`, a `name`, a `phone`, a `mobilePhone`, or a `firstName` or `lastName`. `email` is accepted on create only — a `PATCH` that names it is a `400`, because a contact is identified by its email.',\n fields: {\n id: stringField('Contact id.'),\n object: objectKindField('contact'),\n email: nullableField(\n stringField('Primary email, unique per organization, or `null` for a contact with no address yet.'),\n ),\n name: stringField('Display name.'),\n tags: stringListField('Free-form tags.'),\n notes: stringField('Free-form notes.'),\n marketingConsent: booleanField('Whether the contact accepted marketing email.'),\n consentSites: stringListField('Site ids the consent was given on.'),\n sources: stringListField('Where this contact came from.'),\n phone: stringField('Telephone number.'),\n jobTitle: stringField('Job title.'),\n companyId: nullableField(stringField('Primary company.')),\n address: postalAddressField(),\n ownerUid: nullableField(stringField('Owning user. Checked on the page, not the query.')),\n lifecycleStage: nullableField(stringField('CRM lifecycle stage.')),\n leadSource: nullableField(stringField('Lead source: one of the organization’s Lead source values (CRM › Fields › Leads), stored on the named site’s profile. A value the list does not hold is a `400` naming the values it allows.')),\n // Salesforce's standard contact fields (AGL-3515).\n salutation: nullableField(stringField(\"One of the organization's salutation values (Mr., Ms., Mrs., Dr., Prof. and its own).\")),\n firstName: nullableField(stringField('First name. With `lastName`, it makes the name the named site shows.')),\n lastName: nullableField(stringField('Last name.')),\n department: nullableField(stringField('Department.')),\n mobilePhone: nullableField(stringField('Mobile phone, E.164.')),\n homePhone: nullableField(stringField('Home phone, E.164.')),\n otherPhone: nullableField(stringField('Other phone, E.164.')),\n fax: nullableField(stringField('Fax, E.164.')),\n birthdate: nullableField(stringField('Birthdate, `YYYY-MM-DD`, never in the future.')),\n assistantName: nullableField(stringField(\"Assistant's name.\")),\n assistantPhone: nullableField(stringField(\"Assistant's phone, E.164.\")),\n reportsToContactId: nullableField(stringField('The contact this person reports to. Never the contact itself, and never one that already reports to it.')),\n otherAddress: nullableField(postalAddressField()),\n doNotCall: booleanField('The person asked not to be phoned.'),\n companyIds: stringListField('Every company this contact belongs to.'),\n alternateEmails: stringListField('Other addresses that resolve to this contact.'),\n ...RECORD_STAMPS,\n },\n ops: [\n {\n path: '/v1/contacts', method: 'get', operationId: 'listContacts', summary: 'List contacts', list: true, returns: 'Contact', entitlement: 'crm',\n description: 'Lists the workspace’s contacts: one record per person, with email, name, phone, tags and per-site profile. Filter by exact `email` to find one person.',\n filters: [\n queryParam('email', 'The contact with this email address. Letter case is ignored; an address that cannot be read is refused.'),\n queryParam('tag', 'Contacts with this tag.'),\n queryParam('lifecycleStage', 'Contacts at this lifecycle stage.'),\n queryParam('ownerUid', 'Contacts owned by this workspace member.'),\n ],\n },\n // openWorld: after saving, the address’s mail domain is looked up (DNS) to flag addresses that would bounce.\n { path: '/v1/contacts', method: 'post', operationId: 'createContact', summary: 'Add a contact', accepts: 'ContactWrite', returns: 'Contact', entitlement: 'crm', creates: true, description: 'Adds a person to the workspace’s contacts. An email address is a contact’s identity: one that already belongs to a contact is refused, naming the existing contact’s id. Returns the new contact.', openWorld: true },\n { path: '/v1/contacts/{contactId}', method: 'get', operationId: 'getContact', summary: 'Get a contact', description: 'Returns one contact. Needs `contactId` from List contacts.', returns: 'Contact', entitlement: 'crm', pathParams: [{ name: 'contactId', description: 'Contact id.' }] },\n { path: '/v1/contacts/{contactId}', method: 'patch', operationId: 'updateContact', summary: 'Update a contact', description: 'Changes a contact’s details; fields not sent stay as they are. The email address cannot be changed. Needs `contactId` from List contacts. Returns the updated contact.', accepts: 'ContactWrite', returns: 'Contact', entitlement: 'crm', pathParams: [{ name: 'contactId', description: 'Contact id.' }] },\n { path: '/v1/contacts/{contactId}', method: 'delete', operationId: 'deleteContact', summary: 'Delete a contact', description: 'Removes a person from the workspace’s contacts, with the tags, notes, timeline and consent the workspace’s sites hold for them. Permanent. Needs `contactId` from List contacts.', returns: 'Deleted', entitlement: 'crm', pathParams: [{ name: 'contactId', description: 'Contact id.' }] },\n { path: '/v1/contacts/{contactId}/merge', method: 'post', operationId: 'mergeContact', summary: 'Merge two contacts', description: 'Folds one contact into another: the contact in `contactId` survives and keeps its email, and the contact named in `sourceContactId` is merged into it and deleted. Permanent. Returns the surviving contact.', accepts: 'ContactMerge', returns: 'Contact', entitlement: 'crm', destructive: true, pathParams: [{ name: 'contactId', description: 'The contact that survives.' }], idempotent: true },\n ],\n components: {\n ContactMerge: {\n type: 'object',\n required: ['sourceContactId'],\n description:\n 'Merge another contact into this one. The source is removed. Any other ' +\n 'member is a `400`.',\n properties: {\n sourceContactId: {\n type: 'string',\n description:\n 'The contact to merge FROM. It does not survive, and it must not be ' +\n 'the contact in the path.',\n },\n },\n additionalProperties: false,\n },\n },\n },\n companies: {\n tag: 'Companies',\n docsPage: 'companies',\n description: 'Organizations in the CRM.',\n schemaName: 'Company',\n required: ['id', 'object', 'name'],\n writable: [\n 'name', 'domain', 'website', 'phone', 'address', 'industry', 'ownerUid', 'notes', 'custom', 'mediaIds', 'consentSiteId',\n // Salesforce's Account fields (AGL-3514).\n 'type', 'rating', 'ownership', 'accountSource', 'annualRevenueCents', 'currency', 'numberOfEmployees', 'fax',\n 'accountNumber', 'site', 'tickerSymbol', 'sicCode', 'shippingAddress', 'parentCompanyId',\n ],\n writeOnly: {\n mediaIds: stringListField('Media library files attached to this company, by id, at most 20. An empty array clears them.'),\n consentSiteId: stringField('The site the company is created on behalf of.'),\n },\n writeNote: 'A create needs `name` and `consentSiteId`; a `PATCH` that names `consentSiteId` is a `400`.',\n fields: {\n id: stringField('Company id.'),\n object: objectKindField('company'),\n name: stringField('Company name.'),\n domain: nullableField(stringField('Primary domain. Unique per organization.')),\n website: nullableField(stringField('Website URL.')),\n phone: nullableField(stringField('Telephone number.')),\n address: { ...postalAddressField(), description: 'Billing address. Members are optional and free-form.' },\n industry: nullableField(stringField(companyPicklistNote('Industry', 'industries'))),\n // Salesforce's Account fields (AGL-3514).\n type: nullableField(stringField(companyPicklistNote('Account type', 'types'))),\n rating: nullableField(stringField(companyPicklistNote('Rating', 'ratings'))),\n ownership: nullableField(stringField(companyPicklistNote('Ownership', 'ownership values'))),\n accountSource: nullableField(\n stringField(\n \"Where the account came from: one of the organization's active lead source values \" +\n '(CRM › Fields › Leads), matched without regard to case. Any other value is refused ' +\n 'with a 400 naming the values allowed; the value a company already holds is kept.',\n ),\n ),\n annualRevenueCents: nullableField(integerField('Annual revenue in the minor unit of `currency`, 0 or more.')),\n currency: stringField('Lowercase ISO 4217 code of the annual revenue. `usd` when unset.'),\n numberOfEmployees: nullableField(integerField('Number of employees, 0 to 99,999,999.')),\n fax: nullableField(stringField('E.164 fax number.')),\n accountNumber: nullableField(stringField('Account number, at most 40 characters.')),\n site: nullableField(stringField('Which of the company’s locations this record is, at most 80 characters.')),\n tickerSymbol: nullableField(stringField('Stock ticker symbol, at most 20 characters.')),\n sicCode: nullableField(stringField('Standard Industrial Classification code, at most 20 characters.')),\n shippingAddress: { ...postalAddressField(), description: 'Shipping address. Members are optional and free-form.' },\n parentCompanyId: nullableField(\n stringField('The company this one sits under. Never itself or a company below it; deleting the parent clears it.'),\n ),\n ownerUid: nullableField(stringField('Owning user.')),\n notes: nullableField(stringField('Free-form notes.')),\n custom: openObjectField('Customer-defined fields.'),\n nextTaskAt: nullableField(isoField('When the next open task on this company is due.')),\n siteId: nullableField(stringField('Site the record originated on.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/companies', method: 'get', operationId: 'listCompanies', summary: 'List companies', description: 'Lists the companies in the workspace’s CRM. Filter by exact `domain` to find one.', list: true, returns: 'Company', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM, queryParam('domain', 'Exact match.'), queryParam('ownerUid', 'Owning user.')] },\n { path: '/v1/companies', method: 'post', operationId: 'createCompany', summary: 'Add a company', accepts: 'CompanyWrite', returns: 'Company', entitlement: 'crm', creates: true, description: 'Adds a company to the CRM. Needs a `name`. A company whose domain is already in the CRM is refused, naming the existing id. Returns the new company.', bodyRequires: ['name'] },\n { path: '/v1/companies/{companyId}', method: 'get', operationId: 'getCompany', summary: 'Get a company', description: 'Returns one company. Needs `companyId` from List companies.', returns: 'Company', entitlement: 'crm', pathParams: [{ name: 'companyId', description: 'Company id.' }] },\n { path: '/v1/companies/{companyId}', method: 'patch', operationId: 'updateCompany', summary: 'Update a company', description: 'Changes a company’s details; fields not sent stay as they are. Needs `companyId` from List companies. Returns the updated company.', accepts: 'CompanyWrite', returns: 'Company', entitlement: 'crm', pathParams: [{ name: 'companyId', description: 'Company id.' }] },\n { path: '/v1/companies/{companyId}', method: 'delete', operationId: 'deleteCompany', summary: 'Delete a company', description: 'Deletes a company permanently. Needs `companyId` from List companies.', returns: 'Deleted', entitlement: 'crm', pathParams: [{ name: 'companyId', description: 'Company id.' }] },\n ],\n },\n pipelines: {\n tag: 'Pipelines',\n docsPage: 'pipelines',\n description: 'Deal pipelines and their stages. Read-only over the API.',\n schemaName: 'Pipeline',\n required: ['id', 'object', 'name', 'stages'],\n fields: {\n id: stringField('Pipeline id.'),\n object: objectKindField('pipeline'),\n name: stringField('Pipeline name.'),\n isDefault: booleanField('Whether new deals land here when none is named.'),\n archived: booleanField('Whether the pipeline is archived.'),\n archivedAt: nullableField(isoField('When it was archived.')),\n stages: {\n type: 'array',\n description: 'Ordered stages. A deal’s `stageId` names one of these.',\n items: {\n type: 'object',\n properties: {\n id: { type: 'string' },\n name: { type: 'string' },\n order: { type: 'integer' },\n probability: { type: 'integer', description: 'Chance of closing from this stage, 0–100.' },\n kind: { type: 'string', enum: ['open', 'won', 'lost'] },\n forecastCategory: {\n type: 'string',\n enum: ['omitted', 'pipeline', 'bestCase', 'commit', 'closed'],\n description: 'The forecast category a deal takes on landing in this stage.',\n },\n },\n additionalProperties: true,\n },\n },\n siteId: nullableField(stringField('Site the pipeline belongs to, when scoped.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/pipelines', method: 'get', operationId: 'listPipelines', summary: 'List deal pipelines', description: 'Lists the workspace’s sales pipelines and their stages. A stage’s id is the `stageId` a deal takes.', list: true, returns: 'Pipeline', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM] },\n { path: '/v1/pipelines/{pipelineId}', method: 'get', operationId: 'getPipeline', summary: 'Get a deal pipeline', description: 'Returns one pipeline and its stages. Needs `pipelineId` from List deal pipelines.', returns: 'Pipeline', entitlement: 'crm', pathParams: [{ name: 'pipelineId', description: 'Pipeline id.' }] },\n ],\n },\n deals: {\n tag: 'Deals',\n docsPage: 'deals',\n description: 'Opportunities moving through a pipeline.',\n schemaName: 'Deal',\n required: ['id', 'object', 'title', 'pipelineId', 'stageId'],\n writable: ['title', 'pipelineId', 'stageId', 'status', 'amountCents', 'currency', 'lineItems', 'expectedCloseAt', 'ownerUid', 'contactId', 'companyId', 'lostReason', 'notes', 'custom', 'mediaIds', 'consentSiteId', 'type', 'leadSource', 'nextStep', 'probability', 'forecastCategory', 'campaignId', 'contactRoles'],\n writeOnly: {\n mediaIds: stringListField('Media library files attached to this deal, by id, at most 20. An empty array clears them.'),\n consentSiteId: stringField('The site the deal is created on behalf of.'),\n },\n writeNote:\n '`pipelineId` and `consentSiteId` are accepted on create only; a `PATCH` that names either is a `400`. ' +\n '`type` and `leadSource` must be active values of the organization’s lists (a deal keeps the value it holds). ' +\n 'A stage move sets `forecastCategory` from the new stage and clears `probability`, unless the same body sets them. ' +\n '`contactRoles` replaces the whole list: each contact once, at most 50, at most one `primary`, each `role` an active value of the organization’s contact roles. ' +\n 'The Primary is `contactId`: a body sending both must agree, and `contactId` alone makes that contact Primary.',\n fields: {\n id: stringField('Deal id.'),\n object: objectKindField('deal'),\n title: stringField('Deal title.'),\n pipelineId: stringField('Pipeline the deal sits in.'),\n stageId: stringField('Stage within that pipeline.'),\n status: stringField('`open`, `won` or `lost`.'),\n amountCents: integerField('Value in the smallest unit of `currency`.'),\n currency: stringField('ISO 4217 code.'),\n lineItems: { type: 'array', description: 'Line items, when the deal carries them.', items: { type: 'object', additionalProperties: true } },\n expectedCloseAt: nullableField(isoField('Forecast close date.')),\n closedAt: nullableField(isoField('When it was actually closed.')),\n stageChangedAt: nullableField(isoField('When the stage last moved.')),\n ownerUid: nullableField(stringField('Owning user.')),\n contactId: nullableField(stringField('Associated contact — the Primary of `contactRoles`.')),\n contactRoles: {\n type: 'array',\n description:\n 'Every contact on the deal and the part each plays (Salesforce’s Opportunity Contact Roles). At most one is `primary`, and it is `contactId`.',\n items: {\n type: 'object',\n required: ['contactId', 'primary'],\n properties: {\n contactId: stringField('The contact.'),\n role: nullableField(stringField('One of the organization’s contact roles (Decision Maker, Evaluator, …), or `null` for none.')),\n primary: booleanField('Whether this is the deal’s Primary contact.'),\n },\n },\n },\n companyId: nullableField(stringField('Associated company.')),\n lostReason: nullableField(stringField('Why it was lost.')),\n notes: nullableField(stringField('Free-form notes.')),\n type: nullableField(stringField('Type — one of the organization’s deal types (New Business, Existing Business, …).')),\n leadSource: nullableField(stringField('Lead source — one of the organization’s lead sources.')),\n nextStep: nullableField(stringField('What happens next. At most 255 characters.')),\n probability: nullableField(integerField('This deal’s own chance of closing, 0–100; `null` uses its stage’s. A stage move clears it.')),\n forecastCategory: nullableField(stringField('`omitted`, `pipeline`, `bestCase`, `commit` or `closed`. Every stage move sets it from the new stage.')),\n campaignId: nullableField(stringField('The campaign the deal is attributed to.')),\n custom: openObjectField('Customer-defined fields.'),\n nextTaskAt: nullableField(isoField('When the next open task on this deal is due.')),\n siteId: nullableField(stringField('Site the record originated on.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/deals', method: 'get', operationId: 'listDeals', summary: 'List deals', description: 'Lists the workspace’s deals with their pipeline, stage, amount and status. Filter by pipeline, stage, status or owner.', list: true, returns: 'Deal', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM, queryParam('pipelineId', 'Pipeline.'), queryParam('stageId', 'Stage.'), queryParam('status', 'Deal status.'), queryParam('ownerUid', 'Owning user.'), queryParam('type', 'Type, exactly as stored.'), queryParam('leadSource', 'Lead source, exactly as stored.'), queryParam('forecastCategory', 'Forecast category.'), queryParam('campaignId', 'Campaign.')] },\n { path: '/v1/deals', method: 'post', operationId: 'createDeal', summary: 'Add a deal', description: 'Opens a deal. Needs a `title`; `pipelineId` and `stageId` come from List deal pipelines. Returns the new deal.', accepts: 'DealWrite', returns: 'Deal', entitlement: 'crm', creates: true, bodyRequires: ['title'] },\n { path: '/v1/deals/{dealId}', method: 'get', operationId: 'getDeal', summary: 'Get a deal', description: 'Returns one deal. Needs `dealId` from List deals.', returns: 'Deal', entitlement: 'crm', pathParams: [{ name: 'dealId', description: 'Deal id.' }] },\n { path: '/v1/deals/{dealId}', method: 'patch', operationId: 'updateDeal', summary: 'Update a deal', description: 'Changes a deal, including moving it to another stage or marking it won or lost; fields not sent stay as they are. Needs `dealId` from List deals. Returns the updated deal.', accepts: 'DealWrite', returns: 'Deal', entitlement: 'crm', pathParams: [{ name: 'dealId', description: 'Deal id.' }] },\n { path: '/v1/deals/{dealId}', method: 'delete', operationId: 'deleteDeal', summary: 'Delete a deal', description: 'Deletes a deal permanently. Needs `dealId` from List deals.', returns: 'Deleted', entitlement: 'crm', pathParams: [{ name: 'dealId', description: 'Deal id.' }] },\n ],\n },\n tasks: {\n tag: 'Tasks',\n docsPage: 'tasks',\n description: 'Follow-ups attached to CRM records.',\n schemaName: 'Task',\n required: ['id', 'object', 'title'],\n writable: ['title', 'notes', 'kind', 'priority', 'status', 'dueAt', 'remindAt', 'assigneeUid', 'contactId', 'companyId', 'dealId', 'consentSiteId'],\n writeOnly: {\n consentSiteId: stringField('The site the task is created on behalf of.'),\n },\n writeNote: 'A create needs `title` and `consentSiteId`; a `PATCH` that names `consentSiteId` is a `400`.',\n fields: {\n id: stringField('Task id.'),\n object: objectKindField('task'),\n title: stringField('Task title.'),\n notes: nullableField(stringField('Free-form notes.')),\n kind: stringField('Task type as its meaning: `call`, `email`, `meeting` or `todo`. A write takes the meaning or a label of the Type picklist.'),\n typeLabel: stringField('The organization’s Type picklist label, e.g. `Call`. Read-only; set through `kind`.'),\n priority: stringField('`low`, `normal` or `high`. A write takes the meaning or a label of the Priority picklist.'),\n priorityLabel: stringField('The organization’s Priority picklist label, e.g. `High`. Read-only; set through `priority`.'),\n status: stringField('`open` or `done`. A write takes the meaning or a label of the Status picklist, e.g. `In Progress`.'),\n statusLabel: stringField('The organization’s Status picklist label, e.g. `Not Started`. Read-only; set through `status`.'),\n dueAt: nullableField(isoField('When the task is due.')),\n remindAt: nullableField(isoField('When a reminder is scheduled.')),\n reminderSentAt: nullableField(isoField('When the reminder was sent.')),\n completedAt: nullableField(isoField('When it was completed.')),\n assigneeUid: nullableField(stringField('Assigned user.')),\n contactId: nullableField(stringField('Associated contact.')),\n companyId: nullableField(stringField('Associated company.')),\n dealId: nullableField(stringField('Associated deal.')),\n siteId: nullableField(stringField('Site the record originated on.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/tasks', method: 'get', operationId: 'listTasks', summary: 'List tasks', description: 'Lists the workspace’s CRM tasks. Filter by status, assignee, contact or deal.', list: true, returns: 'Task', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM, queryParam('status', 'Task status.'), queryParam('assigneeUid', 'Assigned user.'), queryParam('contactId', 'Associated contact.'), queryParam('dealId', 'Associated deal.')] },\n { path: '/v1/tasks', method: 'post', operationId: 'createTask', summary: 'Add a task', description: 'Creates a task, such as a follow-up, with a `title` and optionally a due date, a reminder and the contact, company or deal it is about. Returns the new task.', accepts: 'TaskWrite', returns: 'Task', entitlement: 'crm', creates: true, bodyRequires: ['title'] },\n { path: '/v1/tasks/{taskId}', method: 'get', operationId: 'getTask', summary: 'Get a task', description: 'Returns one task. Needs `taskId` from List tasks.', returns: 'Task', entitlement: 'crm', pathParams: [{ name: 'taskId', description: 'Task id.' }] },\n { path: '/v1/tasks/{taskId}', method: 'patch', operationId: 'updateTask', summary: 'Update a task', description: 'Changes a task, including marking it done; fields not sent stay as they are. Needs `taskId` from List tasks. Returns the updated task.', accepts: 'TaskWrite', returns: 'Task', entitlement: 'crm', pathParams: [{ name: 'taskId', description: 'Task id.' }] },\n { path: '/v1/tasks/{taskId}', method: 'delete', operationId: 'deleteTask', summary: 'Delete a task', description: 'Deletes a task permanently. Needs `taskId` from List tasks.', returns: 'Deleted', entitlement: 'crm', pathParams: [{ name: 'taskId', description: 'Task id.' }] },\n ],\n },\n activities: {\n tag: 'Activities',\n docsPage: 'activities',\n description: 'Logged interactions. Append-only: no PATCH.',\n schemaName: 'Activity',\n required: ['id', 'object', 'kind', 'at'],\n writable: ['kind', 'body', 'at', 'byUid', 'contactId', 'companyId', 'dealId', 'outcome', 'durationMinutes', 'direction', 'consentSiteId'],\n writeOnly: {\n consentSiteId: stringField('The site the activity is logged on behalf of.'),\n },\n writeRequired: ['body', 'consentSiteId'],\n fields: {\n id: stringField('Activity id.'),\n object: objectKindField('activity'),\n kind: stringField('What happened, e.g. `call`, `email`, `note`.'),\n body: stringField('Free-form body.'),\n at: isoField('When the interaction happened — not when it was logged.'),\n byUid: nullableField(stringField('User who logged it.')),\n contactId: nullableField(stringField('Associated contact.')),\n companyId: nullableField(stringField('Associated company. When none is sent, the company of the deal, else of the contact.')),\n dealId: nullableField(stringField('Associated deal.')),\n outcome: nullableField(stringField('Outcome label.')),\n durationMinutes: nullableField(integerField('Duration, for calls and meetings.')),\n direction: nullableField(stringField('Which way it went: `inbound`, `outbound` or `internal` for a call, `inbound` or `outbound` for an email.')),\n siteId: nullableField(stringField('Site the record originated on.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/activities', method: 'get', operationId: 'listActivities', summary: 'List activities', description: 'Lists the calls, emails, meetings and notes logged in the CRM. Filter by kind, contact or deal.', list: true, returns: 'Activity', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM, queryParam('kind', 'Activity kind.'), queryParam('contactId', 'Associated contact.'), queryParam('dealId', 'Associated deal.')] },\n { path: '/v1/activities', method: 'post', operationId: 'createActivity', summary: 'Log an activity', description: 'Records a call, email, meeting or note against a contact, company or deal. Needs the activity’s text in `body`. Returns the logged activity. Logging an email records it; it does not send one.', accepts: 'ActivityWrite', returns: 'Activity', entitlement: 'crm', creates: true },\n { path: '/v1/activities/{activityId}', method: 'get', operationId: 'getActivity', summary: 'Get an activity', description: 'Returns one logged activity. Needs `activityId` from List activities.', returns: 'Activity', entitlement: 'crm', pathParams: [{ name: 'activityId', description: 'Activity id.' }] },\n { path: '/v1/activities/{activityId}', method: 'delete', operationId: 'deleteActivity', summary: 'Delete an activity', description: 'Deletes a logged activity permanently. Needs `activityId` from List activities.', returns: 'Deleted', entitlement: 'crm', pathParams: [{ name: 'activityId', description: 'Activity id.' }] },\n ],\n },\n leads: {\n tag: 'Leads',\n docsPage: 'leads',\n description: 'Unqualified interest, before it becomes a contact. A lead is a record of its own: the person and their company as text, until converting makes the contact and the company.',\n schemaName: 'Lead',\n required: ['id', 'object', 'siteId'],\n writable: [\n 'siteId', 'email', 'name', 'status', 'ownerUid', 'ownerEmail', 'notes', 'unqualifiedReason', 'company', 'jobTitle', 'phone', 'website', 'address', 'tags', 'leadSource',\n // Salesforce's standard lead fields (AGL-3513).\n 'salutation', 'firstName', 'lastName', 'mobilePhone', 'fax', 'doNotCall', 'industry', 'rating', 'annualRevenueCents', 'currency', 'numberOfEmployees',\n ],\n writeNote: '`email` and `name` are taken on a create only; a `PATCH` cannot change the address, which is the lead’s identity within its site. While `firstName` or `lastName` is set, `name` is their composition, \"First Last\", and follows them.',\n writeRequired: ['email'],\n writeOnly: {\n siteId: stringField('The site the lead belongs to, instead of the `siteId` query parameter.'),\n status: stringField('One of the organization’s active lead status values by its label (CRM › Fields › Leads), or a meaning — `new`, `nurturing`, `working` or `unqualified` (`nurturing` and `unqualified` on a `PATCH` only). Stored as the meaning and the label together. A lead becomes `qualified` by being converted.'),\n ownerEmail: stringField('A member’s address, resolved against the organization’s roster. Not with `ownerUid` in the same request.'),\n },\n fields: {\n id: stringField('Lead id.'),\n object: objectKindField('lead'),\n siteId: stringField('Site the lead arrived on.'),\n email: nullableField(stringField('Email — the lead’s identity within its site.')),\n name: nullableField(stringField('Name, when supplied.')),\n status: stringField('What the lead status means: `new`, `nurturing`, `working`, `qualified` or `unqualified`. What every filter and automation reads.'),\n statusLabel: stringField('The organization’s label for the lead status value the lead holds — one of `status`’s meaning. Read-only; set it through `status`.'),\n ownerUid: nullableField(stringField('Owning user.')),\n notes: nullableField(stringField('Free-form notes.')),\n unqualifiedReason: nullableField(stringField('Why the lead was disqualified.')),\n company: nullableField(stringField('The company’s name, as text. Converting the lead is what links or creates the company record.')),\n jobTitle: nullableField(stringField('Job title.')),\n phone: nullableField(stringField('E.164 phone number.')),\n website: nullableField(stringField('An http(s) URL.')),\n address: nullableField(postalAddressField()),\n tags: stringListField('Lower-cased tags.'),\n leadSource: nullableField(\n stringField(\n \"Where the lead came from: one of the organization's active lead source values \" +\n '(CRM › Fields › Leads), matched without regard to case. Any other value is refused ' +\n 'with a 400 naming the values allowed; the value a lead already holds is kept even ' +\n \"after it is deactivated. A create that names none starts from the list's default.\",\n ),\n ),\n // Salesforce's standard lead fields (AGL-3513).\n salutation: nullableField(stringField('Salutation: one of the organization’s active Salutation values (CRM › Fields › Contacts), matched without regard to case. Any other value is a `400` naming the values allowed; the value a lead already holds is kept.')),\n firstName: nullableField(stringField('First name, at most 59 characters. While it or `lastName` is set, `name` is \"First Last\".')),\n lastName: nullableField(stringField('Last name, at most 59 characters.')),\n mobilePhone: nullableField(stringField('E.164 mobile phone number.')),\n fax: nullableField(stringField('E.164 fax number.')),\n doNotCall: booleanField('The person asked not to be phoned. A hint on every call control, never a block. `false` clears it.'),\n industry: nullableField(stringField('Industry: one of the organization’s active Industry values (CRM › Fields › Companies) — the list companies keep, so converting carries it. Any other value is a `400` naming the values allowed; the value a lead already holds is kept.')),\n rating: nullableField(stringField('Rating: one of the organization’s active Rating values (CRM › Fields › Companies). Any other value is a `400` naming the values allowed.')),\n annualRevenueCents: nullableField(integerField('Annual revenue in the minor unit of `currency`, 0 or more.')),\n currency: stringField('Lowercase ISO 4217 code of the annual revenue. `usd` when unset.'),\n numberOfEmployees: nullableField(integerField('Number of employees, 0 to 99,999,999.')),\n sources: stringListField('The surfaces that captured the lead: `signup`, `booking`, `form:{formId}`, `import`, `manual`, `api`.'),\n submissionCount: integerField('How many form submissions this lead has made.'),\n firstSeen: isoField('First interaction.'),\n lastSeen: isoField('Most recent interaction.'),\n marketingConsent: booleanField('Whether marketing consent was given.'),\n marketingConsentAt: nullableField(isoField('When consent was given.')),\n convertedContactId: nullableField(stringField('Contact created by conversion.')),\n convertedAt: nullableField(isoField('When it was converted.')),\n companyId: nullableField(stringField('Company created or matched by conversion.')),\n dealId: nullableField(stringField('Deal created by conversion.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/leads', method: 'get', operationId: 'listLeads', summary: 'List a site’s leads', description: 'Lists the leads one site has captured, not yet converted into contacts. Needs `siteId` from List sites. Filter by status or owner.', list: true, returns: 'Lead', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM, LEAD_SITE_PARAM, queryParam('status', 'Lead status.'), queryParam('ownerUid', 'Owning user.')] },\n // openWorld: after saving, the address’s mail domain is looked up (DNS) to flag addresses that would bounce.\n { path: '/v1/leads', method: 'post', operationId: 'createLead', summary: 'Add a lead to a site', accepts: 'LeadWrite', returns: 'Lead', entitlement: 'crm', creates: true, description: 'Adds a lead to one site. Needs `siteId` from List sites and the lead’s `email`. One email is one lead per site: adding an address the site already holds updates that lead. No contact is created until the lead is converted. Returns the lead.', idempotent: true, openWorld: true, bodyRequires: ['siteId', 'email'] },\n { path: '/v1/leads/{leadId}', method: 'get', operationId: 'getLead', summary: 'Get a lead', description: 'Returns one lead. Needs `siteId` from List sites and `leadId` from List a site’s leads.', returns: 'Lead', entitlement: 'crm', pathParams: [{ name: 'leadId', description: 'Lead id.' }], filters: [LEAD_SITE_PARAM] },\n { path: '/v1/leads/{leadId}', method: 'patch', operationId: 'updateLead', summary: 'Update a lead', description: 'Changes a lead, including its status; fields not sent stay as they are. Needs `siteId` from List sites and `leadId` from List a site’s leads. Returns the updated lead.', accepts: 'LeadWrite', returns: 'Lead', entitlement: 'crm', pathParams: [{ name: 'leadId', description: 'Lead id.' }], filters: [LEAD_SITE_PARAM] },\n // openWorld: the contact it creates has its mail domain looked up (DNS) to flag addresses that would bounce.\n { path: '/v1/leads/{leadId}/convert', method: 'post', operationId: 'convertLead', summary: 'Convert a lead into a contact', accepts: 'LeadConvertRequest', bodyOptional: true, returns: 'LeadConversion', entitlement: 'crm', description: 'Turns a lead into a contact, joining an existing contact with the same email, and can also link or create a company and open a deal. Needs `siteId` from List sites and `leadId` from List a site’s leads. Converting a lead again returns the same ids.', pathParams: [{ name: 'leadId', description: 'Lead id.' }], idempotent: true, openWorld: true, filters: [LEAD_SITE_PARAM] },\n ],\n components: {\n LeadConvertRequest: {\n type: 'object',\n description:\n 'Optional. What else the conversion does besides creating the contact. ' +\n 'Leave it out to convert the lead into a contact alone.',\n properties: {\n company: {\n type: ['object', 'null'],\n description:\n 'A company for the contact: `{ \"link\": \"<companyId>\" }` to link one from List companies, ' +\n '`{ \"create\": { \"name\": \"…\", \"domain\": \"…\" } }` to add one (an existing company with that ' +\n 'name or domain is reused), or null for none.',\n },\n deal: {\n type: ['object', 'null'],\n description:\n 'A deal to open in the default pipeline: `{ \"title\": \"…\", \"amountCents\": 12500, \"currency\": ' +\n '\"usd\", \"stageId\": \"…\", \"type\": \"…\" }`. `title` is required; the rest is optional. Null for none.',\n },\n ownerUid: { type: 'string', description: 'Workspace member who owns the contact and the deal. Defaults to the lead’s owner.' },\n ownerEmail: { type: 'string', description: 'The owner by email address, instead of `ownerUid`.' },\n },\n additionalProperties: false,\n },\n LeadConversion: {\n type: 'object',\n description:\n 'What the conversion produced: the contact, and the company and deal ' +\n 'when it made or linked them. Converting the same lead again returns ' +\n 'the same ids.',\n properties: {\n object: { type: 'string', const: 'lead_conversion' },\n contactId: { type: 'string' },\n companyId: { type: ['string', 'null'] },\n dealId: { type: ['string', 'null'] },\n },\n additionalProperties: true,\n },\n },\n },\n 'email-templates': {\n tag: 'Email templates',\n docsPage: 'email-templates',\n description: 'Reusable email bodies.',\n schemaName: 'EmailTemplate',\n required: ['id', 'object', 'name'],\n writable: ['name', 'kind', 'visibility', 'ownerUid', 'subject', 'body', 'consentSiteId'],\n writeOnly: {\n consentSiteId: stringField('The site the template is created on behalf of.'),\n },\n writeNote: 'A create needs `name`, `body` and `consentSiteId`; a `PATCH` that names `consentSiteId` is a `400`.',\n fields: {\n id: stringField('Template id.'),\n object: objectKindField('email_template'),\n name: stringField('Template name.'),\n kind: stringField('Template kind.'),\n visibility: stringField('`org` or `private`.'),\n ownerUid: nullableField(stringField('Owner, for a private template.')),\n subject: stringField('Subject line.'),\n body: stringField('Body. May contain merge tokens.'),\n siteId: nullableField(stringField('Site the template belongs to, when scoped.')),\n ...RECORD_STAMPS,\n },\n ops: [\n { path: '/v1/email-templates', method: 'get', operationId: 'listEmailTemplates', summary: 'List email templates', description: 'Lists the workspace’s saved email templates with their name, subject and kind.', list: true, returns: 'EmailTemplate', entitlement: 'crm', filters: [UPDATED_AFTER_PARAM, queryParam('kind', 'Template kind.'), queryParam('visibility', 'Visibility.')] },\n { path: '/v1/email-templates', method: 'post', operationId: 'createEmailTemplate', summary: 'Add an email template', description: 'Saves a reusable email with a `name`, a subject and the message in `body`. Saving a template sends nothing. Returns the new template.', accepts: 'EmailTemplateWrite', returns: 'EmailTemplate', entitlement: 'crm', creates: true, bodyRequires: ['name', 'body'] },\n { path: '/v1/email-templates/{templateId}', method: 'get', operationId: 'getEmailTemplate', summary: 'Get an email template', description: 'Returns one email template. Needs `templateId` from List email templates.', returns: 'EmailTemplate', entitlement: 'crm', pathParams: [{ name: 'templateId', description: 'Template id.' }] },\n { path: '/v1/email-templates/{templateId}', method: 'patch', operationId: 'updateEmailTemplate', summary: 'Update an email template', description: 'Changes a template; fields not sent stay as they are. Needs `templateId` from List email templates. Returns the updated template.', accepts: 'EmailTemplateWrite', returns: 'EmailTemplate', entitlement: 'crm', pathParams: [{ name: 'templateId', description: 'Template id.' }] },\n { path: '/v1/email-templates/{templateId}', method: 'delete', operationId: 'deleteEmailTemplate', summary: 'Delete an email template', description: 'Deletes a template permanently. Needs `templateId` from List email templates.', returns: 'Deleted', entitlement: 'crm', pathParams: [{ name: 'templateId', description: 'Template id.' }] },\n ],\n },\n}\n"],"names":["booleanField","integerField","isoField","nullableField","objectKindField","openObjectField","postalAddressField","queryParam","requiredQueryParam","RECORD_STAMPS","stringField","stringListField","UPDATED_AFTER_PARAM","companyPicklistNote","label","plural","LEAD_SITE_PARAM","CRM_API_V1_DESCRIPTIONS","contacts","tag","docsPage","description","schemaName","required","writable","writeOnly","consentSiteId","consentGroupId","custom","mediaIds","writeNote","fields","id","object","email","name","tags","notes","marketingConsent","consentSites","sources","phone","jobTitle","companyId","address","ownerUid","lifecycleStage","leadSource","salutation","firstName","lastName","department","mobilePhone","homePhone","otherPhone","fax","birthdate","assistantName","assistantPhone","reportsToContactId","otherAddress","doNotCall","companyIds","alternateEmails","ops","path","method","operationId","summary","list","returns","entitlement","filters","accepts","creates","openWorld","pathParams","destructive","idempotent","components","ContactMerge","type","properties","sourceContactId","additionalProperties","companies","domain","website","industry","rating","ownership","accountSource","annualRevenueCents","currency","numberOfEmployees","accountNumber","site","tickerSymbol","sicCode","shippingAddress","parentCompanyId","nextTaskAt","siteId","bodyRequires","pipelines","isDefault","archived","archivedAt","stages","items","order","probability","kind","enum","forecastCategory","deals","title","pipelineId","stageId","status","amountCents","lineItems","expectedCloseAt","closedAt","stageChangedAt","contactId","contactRoles","role","primary","lostReason","nextStep","campaignId","tasks","typeLabel","priority","priorityLabel","statusLabel","dueAt","remindAt","reminderSentAt","completedAt","assigneeUid","dealId","activities","writeRequired","body","at","byUid","outcome","durationMinutes","direction","leads","ownerEmail","unqualifiedReason","company","submissionCount","firstSeen","lastSeen","marketingConsentAt","convertedContactId","convertedAt","bodyOptional","LeadConvertRequest","deal","LeadConversion","const","visibility","subject"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAEEA,YAAY,EACZC,YAAY,EACZC,QAAQ,EACRC,aAAa,EACbC,eAAe,EACfC,eAAe,EACfC,kBAAkB,EAClBC,UAAU,EACVC,kBAAkB,EAClBC,aAAa,EACbC,WAAW,EACXC,eAAe,EACfC,mBAAmB,QACd,qDAAoD;AAE3D;;;;;;;;;;CAUC,GACD,sEAAsE,GACtE,SAASC,oBAAoBC,KAAa,EAAEC,MAAc;IACxD,OACE,GAAGD,MAAM,mCAAmC,EAAEC,OAAO,qCAAqC,CAAC,GAC3F,8FACA;AAEJ;AAGA;;;;;CAKC,GACD,MAAMC,kBAAkBR,mBACtB,UACA;AAGF,OAAO,MAAMS,0BAA8E;IACzFC,UAAU;QACRC,KAAK;QACLC,UAAU;QACVC,aAAa;QACbC,YAAY;QACZC,UAAU;YAAC;YAAM;YAAU;SAAQ;QACnCC,UAAU;YACR;YAAS;YAAQ;YAAQ;YAAS;YAAoB;YAAiB;YAAkB;YACzF;YAAS;YAAY;YAAa;YAAW;YAAY;YAAkB;YAC3E;YACA,mDAAmD;YACnD;YAAc;YAAa;YAAY;YAAc;YAAe;YAAa;YACjF;YAAO;YAAa;YAAiB;YAAkB;YAAsB;YAAgB;SAC9F;QACDC,WAAW;YACTC,eAAehB,YAAY;YAC3BiB,gBAAgBjB,YAAY;YAC5BkB,QAAQvB,gBAAgB;YACxBwB,UAAUlB,gBAAgB;QAC5B;QACAmB,WAAW;QACXC,QAAQ;YACNC,IAAItB,YAAY;YAChBuB,QAAQ7B,gBAAgB;YACxB8B,OAAO/B,cACLO,YAAY;YAEdyB,MAAMzB,YAAY;YAClB0B,MAAMzB,gBAAgB;YACtB0B,OAAO3B,YAAY;YACnB4B,kBAAkBtC,aAAa;YAC/BuC,cAAc5B,gBAAgB;YAC9B6B,SAAS7B,gBAAgB;YACzB8B,OAA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