@workbuddy/sdk-js-vnext 1.0.58 → 1.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +236 -423
  2. package/index.js +98 -173
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -520,7 +520,7 @@ export class WorkBuddyClient {
520
520
  this.settings = {
521
521
  entityStatuses: {
522
522
  /**
523
- * Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier
523
+ * Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier, contact, external-user
524
524
  * Operation: PublicApiEntityStatusController_list
525
525
  */
526
526
  list: (params = {}, options = {}) => this.request('PublicApiEntityStatusController_list', params, options),
@@ -684,6 +684,24 @@ export class WorkBuddyClient {
684
684
  this.request('PublicApiCustomFieldController_listItemCustomFields', params, options),
685
685
  },
686
686
  },
687
+ roles: {
688
+ clientPortal: {
689
+ /**
690
+ * Roles assignable to customer login contacts (UserType.Client). Includes custom client roles; includes built-in system client roles only when Enable System Security Roles is on for the tenant. Use item.id as roleId when login is true on contact create/invite.
691
+ * Operation: PublicApiPortalRoleController_listClientPortal
692
+ */
693
+ list: (params = {}, options = {}) =>
694
+ this.request('PublicApiPortalRoleController_listClientPortal', params, options),
695
+ },
696
+ contractorPortal: {
697
+ /**
698
+ * Roles assignable to contractor login contacts (UserType.Subcontractor). Includes custom contractor roles; includes built-in system contractor roles only when Enable System Security Roles is on for the tenant. Use item.id as roleId when login is true on contact create/invite.
699
+ * Operation: PublicApiPortalRoleController_listContractorPortal
700
+ */
701
+ list: (params = {}, options = {}) =>
702
+ this.request('PublicApiPortalRoleController_listContractorPortal', params, options),
703
+ },
704
+ },
687
705
  };
688
706
 
689
707
  this.attachments = {
@@ -731,28 +749,12 @@ export class WorkBuddyClient {
731
749
  contacts: {
732
750
  invite: {
733
751
  /**
734
- * Promote an existing contact to external user and send invite (CRM)
752
+ * Invite contact (CRM)
735
753
  * Operation: PublicCrmCustomerController_inviteContact
736
754
  */
737
755
  inviteContact: (params = {}, options = {}) =>
738
756
  this.request('PublicCrmCustomerController_inviteContact', params, options),
739
757
  },
740
- activate: {
741
- /**
742
- * Unlock portal login for an external user (CRM)
743
- * Operation: PublicCrmCustomerController_activateContact
744
- */
745
- activateContact: (params = {}, options = {}) =>
746
- this.request('PublicCrmCustomerController_activateContact', params, options),
747
- },
748
- deactivate: {
749
- /**
750
- * Lock portal login for an external user (CRM)
751
- * Operation: PublicCrmCustomerController_deactivateContact
752
- */
753
- deactivateContact: (params = {}, options = {}) =>
754
- this.request('PublicCrmCustomerController_deactivateContact', params, options),
755
- },
756
758
  /**
757
759
  * List contacts for customer (contacts + external users)
758
760
  * Operation: PublicCrmCustomerController_listContacts
@@ -766,23 +768,11 @@ export class WorkBuddyClient {
766
768
  pages: (params = {}, options = {}) =>
767
769
  this.paginatePages('PublicCrmCustomerController_listContacts', params, options),
768
770
  /**
769
- * Create customer contact. login=false creates a contact; login=true invites an external user (email required and must be free via ID validate).
771
+ * Create customer contact
770
772
  * Operation: PublicCrmCustomerController_createContact
771
773
  */
772
774
  createContact: (params = {}, options = {}) =>
773
775
  this.request('PublicCrmCustomerController_createContact', params, options),
774
- /**
775
- * Get customer contact by ID
776
- * Operation: PublicCrmCustomerController_getContact
777
- */
778
- getContact: (params = {}, options = {}) =>
779
- this.request('PublicCrmCustomerController_getContact', params, options),
780
- /**
781
- * Update customer contact
782
- * Operation: PublicCrmCustomerController_updateContact
783
- */
784
- updateContact: (params = {}, options = {}) =>
785
- this.request('PublicCrmCustomerController_updateContact', params, options),
786
776
  /**
787
777
  * Delete customer contact
788
778
  * Operation: PublicCrmCustomerController_deleteContact
@@ -855,28 +845,12 @@ export class WorkBuddyClient {
855
845
  contacts: {
856
846
  invite: {
857
847
  /**
858
- * Promote an existing contact to external user and send invite (CRM > Contractors)
848
+ * Invite contact (CRM > Contractors)
859
849
  * Operation: PublicCrmContractorController_inviteContact
860
850
  */
861
851
  inviteContact: (params = {}, options = {}) =>
862
852
  this.request('PublicCrmContractorController_inviteContact', params, options),
863
853
  },
864
- activate: {
865
- /**
866
- * Unlock portal login for an external user (CRM > Contractors)
867
- * Operation: PublicCrmContractorController_activateContact
868
- */
869
- activateContact: (params = {}, options = {}) =>
870
- this.request('PublicCrmContractorController_activateContact', params, options),
871
- },
872
- deactivate: {
873
- /**
874
- * Lock portal login for an external user (CRM > Contractors)
875
- * Operation: PublicCrmContractorController_deactivateContact
876
- */
877
- deactivateContact: (params = {}, options = {}) =>
878
- this.request('PublicCrmContractorController_deactivateContact', params, options),
879
- },
880
854
  /**
881
855
  * List contacts for contractor (contacts + external users)
882
856
  * Operation: PublicCrmContractorController_listContacts
@@ -890,23 +864,11 @@ export class WorkBuddyClient {
890
864
  pages: (params = {}, options = {}) =>
891
865
  this.paginatePages('PublicCrmContractorController_listContacts', params, options),
892
866
  /**
893
- * Create contractor contact. login=false creates a contact; login=true invites an external user (email required and must be free via ID validate).
867
+ * Create contractor contact
894
868
  * Operation: PublicCrmContractorController_createContact
895
869
  */
896
870
  createContact: (params = {}, options = {}) =>
897
871
  this.request('PublicCrmContractorController_createContact', params, options),
898
- /**
899
- * Get contractor contact by ID
900
- * Operation: PublicCrmContractorController_getContact
901
- */
902
- getContact: (params = {}, options = {}) =>
903
- this.request('PublicCrmContractorController_getContact', params, options),
904
- /**
905
- * Update contractor contact
906
- * Operation: PublicCrmContractorController_updateContact
907
- */
908
- updateContact: (params = {}, options = {}) =>
909
- this.request('PublicCrmContractorController_updateContact', params, options),
910
872
  /**
911
873
  * Delete contractor contact
912
874
  * Operation: PublicCrmContractorController_deleteContact
@@ -1007,8 +969,16 @@ export class WorkBuddyClient {
1007
969
  get: (params = {}, options = {}) => this.request('PublicCrmExternalUserController_getById', params, options),
1008
970
  },
1009
971
  contacts: {
972
+ status: {
973
+ /**
974
+ * Update contact status
975
+ * Operation: PublicCrmContactController_updateStatus
976
+ */
977
+ updateStatus: (params = {}, options = {}) =>
978
+ this.request('PublicCrmContactController_updateStatus', params, options),
979
+ },
1010
980
  /**
1011
- * List contacts (Basic and Login contacts)
981
+ * List contacts (contacts + external users)
1012
982
  * Operation: PublicCrmContactController_list
1013
983
  */
1014
984
  list: (params = {}, options = {}) => this.request('PublicCrmContactController_list', params, options),
@@ -1021,6 +991,11 @@ export class WorkBuddyClient {
1021
991
  * Operation: PublicCrmContactController_getById
1022
992
  */
1023
993
  get: (params = {}, options = {}) => this.request('PublicCrmContactController_getById', params, options),
994
+ /**
995
+ * Update contact
996
+ * Operation: PublicCrmContactController_update
997
+ */
998
+ update: (params = {}, options = {}) => this.request('PublicCrmContactController_update', params, options),
1024
999
  },
1025
1000
  invites: {
1026
1001
  /**
@@ -1792,7 +1767,7 @@ export const operations = [
1792
1767
  actionName: 'list',
1793
1768
  displayName: 'List entity statuses',
1794
1769
  description:
1795
- 'Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier',
1770
+ 'Retrieve all active statuses for a given entity type. Supported entities: customer, contractor, supplier, contact, external-user',
1796
1771
  method: 'GET',
1797
1772
  path: '/settings/entity-statuses/{entity}',
1798
1773
  pathParams: ['entity'],
@@ -2085,6 +2060,32 @@ export const operations = [
2085
2060
  queryParams: [],
2086
2061
  hasRequestBody: false,
2087
2062
  },
2063
+ {
2064
+ operationId: 'PublicApiPortalRoleController_listClientPortal',
2065
+ resourcePath: ['settings', 'roles', 'clientPortal'],
2066
+ actionName: 'list',
2067
+ displayName: 'List client portal roles',
2068
+ description:
2069
+ 'Roles assignable to customer login contacts (UserType.Client). Includes custom client roles; includes built-in system client roles only when Enable System Security Roles is on for the tenant. Use item.id as roleId when login is true on contact create/invite.',
2070
+ method: 'GET',
2071
+ path: '/settings/roles/client-portal',
2072
+ pathParams: [],
2073
+ queryParams: [],
2074
+ hasRequestBody: false,
2075
+ },
2076
+ {
2077
+ operationId: 'PublicApiPortalRoleController_listContractorPortal',
2078
+ resourcePath: ['settings', 'roles', 'contractorPortal'],
2079
+ actionName: 'list',
2080
+ displayName: 'List contractor portal roles',
2081
+ description:
2082
+ 'Roles assignable to contractor login contacts (UserType.Subcontractor). Includes custom contractor roles; includes built-in system contractor roles only when Enable System Security Roles is on for the tenant. Use item.id as roleId when login is true on contact create/invite.',
2083
+ method: 'GET',
2084
+ path: '/settings/roles/contractor-portal',
2085
+ pathParams: [],
2086
+ queryParams: [],
2087
+ hasRequestBody: false,
2088
+ },
2088
2089
  {
2089
2090
  operationId: 'PublicAttachmentController_createUploadSession',
2090
2091
  resourcePath: ['attachments'],
@@ -2695,40 +2696,14 @@ export const operations = [
2695
2696
  operationId: 'PublicCrmCustomerController_createContact',
2696
2697
  resourcePath: ['crm', 'customers', 'contacts'],
2697
2698
  actionName: 'createContact',
2698
- displayName:
2699
- 'Create customer contact. login=false creates a contact; login=true invites an external user (email required and must be free via ID validate).',
2700
- description:
2701
- 'Create customer contact. login=false creates a contact; login=true invites an external user (email required and must be free via ID validate).',
2699
+ displayName: 'Create customer contact',
2700
+ description: 'Create customer contact',
2702
2701
  method: 'POST',
2703
2702
  path: '/customers/{customerId}/contacts',
2704
2703
  pathParams: ['customerId'],
2705
2704
  queryParams: [],
2706
2705
  hasRequestBody: true,
2707
2706
  },
2708
- {
2709
- operationId: 'PublicCrmCustomerController_getContact',
2710
- resourcePath: ['crm', 'customers', 'contacts'],
2711
- actionName: 'getContact',
2712
- displayName: 'Get customer contact by ID',
2713
- description: 'Get customer contact by ID',
2714
- method: 'GET',
2715
- path: '/customers/{customerId}/contacts/{contactId}',
2716
- pathParams: ['customerId', 'contactId'],
2717
- queryParams: [],
2718
- hasRequestBody: false,
2719
- },
2720
- {
2721
- operationId: 'PublicCrmCustomerController_updateContact',
2722
- resourcePath: ['crm', 'customers', 'contacts'],
2723
- actionName: 'updateContact',
2724
- displayName: 'Update customer contact',
2725
- description: 'Update customer contact',
2726
- method: 'PATCH',
2727
- path: '/customers/{customerId}/contacts/{contactId}',
2728
- pathParams: ['customerId', 'contactId'],
2729
- queryParams: [],
2730
- hasRequestBody: true,
2731
- },
2732
2707
  {
2733
2708
  operationId: 'PublicCrmCustomerController_deleteContact',
2734
2709
  resourcePath: ['crm', 'customers', 'contacts'],
@@ -2745,38 +2720,14 @@ export const operations = [
2745
2720
  operationId: 'PublicCrmCustomerController_inviteContact',
2746
2721
  resourcePath: ['crm', 'customers', 'contacts', 'invite'],
2747
2722
  actionName: 'inviteContact',
2748
- displayName: 'Promote an existing contact to external user and send invite (CRM)',
2749
- description: 'Promote an existing contact to external user and send invite (CRM)',
2723
+ displayName: 'Invite contact (CRM)',
2724
+ description: 'Invite contact (CRM)',
2750
2725
  method: 'POST',
2751
2726
  path: '/customers/{customerId}/contacts/{contactId}/invite',
2752
2727
  pathParams: ['customerId', 'contactId'],
2753
2728
  queryParams: [],
2754
2729
  hasRequestBody: true,
2755
2730
  },
2756
- {
2757
- operationId: 'PublicCrmCustomerController_activateContact',
2758
- resourcePath: ['crm', 'customers', 'contacts', 'activate'],
2759
- actionName: 'activateContact',
2760
- displayName: 'Unlock portal login for an external user (CRM)',
2761
- description: 'Unlock portal login for an external user (CRM)',
2762
- method: 'POST',
2763
- path: '/customers/{customerId}/contacts/{contactId}/activate',
2764
- pathParams: ['customerId', 'contactId'],
2765
- queryParams: [],
2766
- hasRequestBody: false,
2767
- },
2768
- {
2769
- operationId: 'PublicCrmCustomerController_deactivateContact',
2770
- resourcePath: ['crm', 'customers', 'contacts', 'deactivate'],
2771
- actionName: 'deactivateContact',
2772
- displayName: 'Lock portal login for an external user (CRM)',
2773
- description: 'Lock portal login for an external user (CRM)',
2774
- method: 'POST',
2775
- path: '/customers/{customerId}/contacts/{contactId}/deactivate',
2776
- pathParams: ['customerId', 'contactId'],
2777
- queryParams: [],
2778
- hasRequestBody: false,
2779
- },
2780
2731
  {
2781
2732
  operationId: 'PublicCrmCustomerController_listSites',
2782
2733
  resourcePath: ['crm', 'customers', 'sites'],
@@ -2897,40 +2848,14 @@ export const operations = [
2897
2848
  operationId: 'PublicCrmContractorController_createContact',
2898
2849
  resourcePath: ['crm', 'contractors', 'contacts'],
2899
2850
  actionName: 'createContact',
2900
- displayName:
2901
- 'Create contractor contact. login=false creates a contact; login=true invites an external user (email required and must be free via ID validate).',
2902
- description:
2903
- 'Create contractor contact. login=false creates a contact; login=true invites an external user (email required and must be free via ID validate).',
2851
+ displayName: 'Create contractor contact',
2852
+ description: 'Create contractor contact',
2904
2853
  method: 'POST',
2905
2854
  path: '/contractors/{contractorId}/contacts',
2906
2855
  pathParams: ['contractorId'],
2907
2856
  queryParams: [],
2908
2857
  hasRequestBody: true,
2909
2858
  },
2910
- {
2911
- operationId: 'PublicCrmContractorController_getContact',
2912
- resourcePath: ['crm', 'contractors', 'contacts'],
2913
- actionName: 'getContact',
2914
- displayName: 'Get contractor contact by ID',
2915
- description: 'Get contractor contact by ID',
2916
- method: 'GET',
2917
- path: '/contractors/{contractorId}/contacts/{contactId}',
2918
- pathParams: ['contractorId', 'contactId'],
2919
- queryParams: [],
2920
- hasRequestBody: false,
2921
- },
2922
- {
2923
- operationId: 'PublicCrmContractorController_updateContact',
2924
- resourcePath: ['crm', 'contractors', 'contacts'],
2925
- actionName: 'updateContact',
2926
- displayName: 'Update contractor contact',
2927
- description: 'Update contractor contact',
2928
- method: 'PATCH',
2929
- path: '/contractors/{contractorId}/contacts/{contactId}',
2930
- pathParams: ['contractorId', 'contactId'],
2931
- queryParams: [],
2932
- hasRequestBody: true,
2933
- },
2934
2859
  {
2935
2860
  operationId: 'PublicCrmContractorController_deleteContact',
2936
2861
  resourcePath: ['crm', 'contractors', 'contacts'],
@@ -2947,38 +2872,14 @@ export const operations = [
2947
2872
  operationId: 'PublicCrmContractorController_inviteContact',
2948
2873
  resourcePath: ['crm', 'contractors', 'contacts', 'invite'],
2949
2874
  actionName: 'inviteContact',
2950
- displayName: 'Promote an existing contact to external user and send invite (CRM > Contractors)',
2951
- description: 'Promote an existing contact to external user and send invite (CRM > Contractors)',
2875
+ displayName: 'Invite contact (CRM > Contractors)',
2876
+ description: 'Invite contact (CRM > Contractors)',
2952
2877
  method: 'POST',
2953
2878
  path: '/contractors/{contractorId}/contacts/{contactId}/invite',
2954
2879
  pathParams: ['contractorId', 'contactId'],
2955
2880
  queryParams: [],
2956
2881
  hasRequestBody: true,
2957
2882
  },
2958
- {
2959
- operationId: 'PublicCrmContractorController_activateContact',
2960
- resourcePath: ['crm', 'contractors', 'contacts', 'activate'],
2961
- actionName: 'activateContact',
2962
- displayName: 'Unlock portal login for an external user (CRM > Contractors)',
2963
- description: 'Unlock portal login for an external user (CRM > Contractors)',
2964
- method: 'POST',
2965
- path: '/contractors/{contractorId}/contacts/{contactId}/activate',
2966
- pathParams: ['contractorId', 'contactId'],
2967
- queryParams: [],
2968
- hasRequestBody: false,
2969
- },
2970
- {
2971
- operationId: 'PublicCrmContractorController_deactivateContact',
2972
- resourcePath: ['crm', 'contractors', 'contacts', 'deactivate'],
2973
- actionName: 'deactivateContact',
2974
- displayName: 'Lock portal login for an external user (CRM > Contractors)',
2975
- description: 'Lock portal login for an external user (CRM > Contractors)',
2976
- method: 'POST',
2977
- path: '/contractors/{contractorId}/contacts/{contactId}/deactivate',
2978
- pathParams: ['contractorId', 'contactId'],
2979
- queryParams: [],
2980
- hasRequestBody: false,
2981
- },
2982
2883
  {
2983
2884
  operationId: 'PublicCrmSupplierController_list',
2984
2885
  resourcePath: ['crm', 'suppliers'],
@@ -3099,8 +3000,8 @@ export const operations = [
3099
3000
  actionName: 'list',
3100
3001
  paginatedItemsActionName: 'all',
3101
3002
  paginatedPagesActionName: 'pages',
3102
- displayName: 'List contacts (Basic and Login contacts)',
3103
- description: 'List contacts (Basic and Login contacts)',
3003
+ displayName: 'List contacts (contacts + external users)',
3004
+ description: 'List contacts (contacts + external users)',
3104
3005
  method: 'GET',
3105
3006
  path: '/contacts',
3106
3007
  pathParams: [],
@@ -3119,6 +3020,30 @@ export const operations = [
3119
3020
  queryParams: [],
3120
3021
  hasRequestBody: false,
3121
3022
  },
3023
+ {
3024
+ operationId: 'PublicCrmContactController_update',
3025
+ resourcePath: ['crm', 'contacts'],
3026
+ actionName: 'update',
3027
+ displayName: 'Update contact',
3028
+ description: 'Update contact',
3029
+ method: 'PATCH',
3030
+ path: '/contacts/{id}',
3031
+ pathParams: ['id'],
3032
+ queryParams: [],
3033
+ hasRequestBody: true,
3034
+ },
3035
+ {
3036
+ operationId: 'PublicCrmContactController_updateStatus',
3037
+ resourcePath: ['crm', 'contacts', 'status'],
3038
+ actionName: 'updateStatus',
3039
+ displayName: 'Update contact status',
3040
+ description: 'Update contact status',
3041
+ method: 'PATCH',
3042
+ path: '/contacts/{id}/status',
3043
+ pathParams: ['id'],
3044
+ queryParams: [],
3045
+ hasRequestBody: true,
3046
+ },
3122
3047
  {
3123
3048
  operationId: 'PublicCrmInviteController_list',
3124
3049
  resourcePath: ['crm', 'invites'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workbuddy/sdk-js-vnext",
3
- "version": "1.0.58",
3
+ "version": "1.0.60",
4
4
  "description": "WorkBuddy Public API JavaScript client",
5
5
  "license": "MIT",
6
6
  "type": "module",