@companieshouse/api-sdk-node 2.0.274 → 2.0.276

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.
@@ -18,27 +18,46 @@ export default class AssociationsService {
18
18
  * @param includeRemoved - a flag to get a list of companies where status is "removed". Default value: false.
19
19
  * @param pageIndex - a page number to be returned. Default value: 0.
20
20
  * @param itemsPerPage - a number of items to be returned per page. Default value: 15.
21
- * @param userEmail - an email address of a user to check if associated with the company.
22
- * @param userId - a unique identifier of a user to check if associated with the company.
23
21
  * @returns a promise that resolves to the HTTP response from the server that includes the associations or errors object.
24
22
  */
25
- getCompanyAssociations(companyNumber: string, includeRemoved?: boolean, pageIndex?: number, itemsPerPage?: number, userEmail?: string, userId?: string): Promise<Resource<AssociationList | Errors>>;
23
+ getCompanyAssociations(companyNumber: string, includeRemoved?: boolean, pageIndex?: number, itemsPerPage?: number): Promise<Resource<AssociationList | Errors>>;
26
24
  /**
27
- * Initiates an HTTP GET request to retrieve the associations searched based on association status.
28
- * @param associationStatus - an association status used to filter associations. This parameter is required. Available values: confirmed, awaiting-approval, removed. Default value: confirmed.
29
- * @param pageIndex - a page to be returned. Default value: 0.
30
- * @param itemsPerPage - a number of items returned per page. Default value: 15.
31
- * @param companyNumber - a filter based on company number.
32
- * @returns a promise that resolves to the HTTP response from the server that includes the associations or errors object.
25
+ * Searches for an association between a user and a company using either the user's email or user ID.
26
+ * Only one of userEmail or userId should be provided.
27
+ * Optionally filter by association status.
28
+ *
29
+ * @param companyNumber - The company number to search associations for.
30
+ * @param userEmail - The user's email address (optional).
31
+ * @param userId - The user's unique identifier (optional).
32
+ * @param associationStatus - Array of association statuses to filter by (optional).
33
+ * Available values: confirmed, awaiting-approval, removed, migrated, unauthorised.
34
+ * Default: confirmed.
35
+ * @returns Promise resolving to the association or errors object.
33
36
  */
37
+ searchForCompanyAssociation(companyNumber: string, userEmail?: string, userId?: string, associationStatus?: AssociationStatus[]): Promise<Resource<Association | Errors>>;
38
+ /**
39
+ * Initiates an HTTP GET request to retrieve the associations searched based on association status.
40
+ * @param associationStatus - an association status used to filter associations. This parameter is required. Available values: confirmed, awaiting-approval, removed. Default value: confirmed.
41
+ * @param pageIndex - a page to be returned. Default value: 0.
42
+ * @param itemsPerPage - a number of items returned per page. Default value: 15.
43
+ * @param companyNumber - a filter based on company number.
44
+ * @returns a promise that resolves to the HTTP response from the server that includes the associations or errors object.
45
+ */
34
46
  searchAssociations(associationStatus: AssociationStatus[], pageIndex?: number, itemsPerPage?: number, companyNumber?: string): Promise<Resource<AssociationList | Errors>>;
35
47
  /**
36
- * Creates a new association for a user in session.
37
- * @param companyNumber - a company number of the company with which a new association for the user will be created.
38
- * @param inviteeEmailAddress - an email address of the user invited to have an association with a company.
39
- * @returns a promise that resolves to the HTTP response from the server that includes the new association's link (it contains the association identifier) or errors object.
48
+ * Creates a new association for a user with provided userId.
49
+ * @param companyNumber - The company number for the new association.
50
+ * @param userId - The user's unique identifier.
51
+ * @returns A promise resolving to the new association's link or errors object.
52
+ */
53
+ createAssociation(companyNumber: string, userId: string): Promise<Resource<NewAssociationResponse | Errors>>;
54
+ /**
55
+ * Invites a user with the provided email address to a company.
56
+ * @param companyNumber - The company number.
57
+ * @param inviteeEmailAddress - The email address of the user to invite.
58
+ * @returns A promise resolving to the new association's link or errors object.
40
59
  */
41
- createAssociation(companyNumber: string, inviteeEmailAddress?: string): Promise<Resource<NewAssociationResponse | Errors>>;
60
+ inviteUser(companyNumber: string, inviteeEmailAddress: string): Promise<Resource<NewAssociationResponse | Errors>>;
42
61
  /**
43
62
  * Returns an association data for the association with the provided association identifier.
44
63
  * @param associationId - an identifier of the association for which data has to be returned.
@@ -30,39 +30,59 @@ class AssociationsService {
30
30
  * @param includeRemoved - a flag to get a list of companies where status is "removed". Default value: false.
31
31
  * @param pageIndex - a page number to be returned. Default value: 0.
32
32
  * @param itemsPerPage - a number of items to be returned per page. Default value: 15.
33
- * @param userEmail - an email address of a user to check if associated with the company.
34
- * @param userId - a unique identifier of a user to check if associated with the company.
35
33
  * @returns a promise that resolves to the HTTP response from the server that includes the associations or errors object.
36
34
  */
37
- getCompanyAssociations(companyNumber, includeRemoved, pageIndex, itemsPerPage, userEmail, userId) {
35
+ getCompanyAssociations(companyNumber, includeRemoved, pageIndex, itemsPerPage) {
38
36
  return __awaiter(this, void 0, void 0, function* () {
39
37
  let queryString = "";
40
- if (includeRemoved || pageIndex || itemsPerPage || userId) {
38
+ if (includeRemoved || pageIndex || itemsPerPage) {
41
39
  const queryParameters = {
42
40
  include_removed: includeRemoved || undefined,
43
41
  page_index: pageIndex || undefined,
44
- items_per_page: itemsPerPage || undefined,
45
- user_id: userId || undefined
42
+ items_per_page: itemsPerPage || undefined
46
43
  };
47
44
  queryString = this.getQueryString(queryParameters);
48
45
  }
49
- let headers;
50
- if (userEmail) {
51
- headers = { user_email: userEmail };
52
- }
53
46
  const url = `/associations/companies/${companyNumber}${queryString}`;
54
- const response = yield this.client.httpGet(url, headers);
47
+ const response = yield this.client.httpGet(url);
55
48
  return this.getResource(response);
56
49
  });
57
50
  }
58
51
  /**
59
- * Initiates an HTTP GET request to retrieve the associations searched based on association status.
60
- * @param associationStatus - an association status used to filter associations. This parameter is required. Available values: confirmed, awaiting-approval, removed. Default value: confirmed.
61
- * @param pageIndex - a page to be returned. Default value: 0.
62
- * @param itemsPerPage - a number of items returned per page. Default value: 15.
63
- * @param companyNumber - a filter based on company number.
64
- * @returns a promise that resolves to the HTTP response from the server that includes the associations or errors object.
52
+ * Searches for an association between a user and a company using either the user's email or user ID.
53
+ * Only one of userEmail or userId should be provided.
54
+ * Optionally filter by association status.
55
+ *
56
+ * @param companyNumber - The company number to search associations for.
57
+ * @param userEmail - The user's email address (optional).
58
+ * @param userId - The user's unique identifier (optional).
59
+ * @param associationStatus - Array of association statuses to filter by (optional).
60
+ * Available values: confirmed, awaiting-approval, removed, migrated, unauthorised.
61
+ * Default: confirmed.
62
+ * @returns Promise resolving to the association or errors object.
65
63
  */
64
+ searchForCompanyAssociation(companyNumber, userEmail, userId, associationStatus) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const url = `/associations/companies/${companyNumber}/search`;
67
+ const body = {};
68
+ if (userEmail)
69
+ body.user_email = userEmail;
70
+ if (userId)
71
+ body.user_id = userId;
72
+ if (associationStatus)
73
+ body.status = associationStatus;
74
+ const response = yield this.client.httpPost(url, body);
75
+ return this.getResource(response);
76
+ });
77
+ }
78
+ /**
79
+ * Initiates an HTTP GET request to retrieve the associations searched based on association status.
80
+ * @param associationStatus - an association status used to filter associations. This parameter is required. Available values: confirmed, awaiting-approval, removed. Default value: confirmed.
81
+ * @param pageIndex - a page to be returned. Default value: 0.
82
+ * @param itemsPerPage - a number of items returned per page. Default value: 15.
83
+ * @param companyNumber - a filter based on company number.
84
+ * @returns a promise that resolves to the HTTP response from the server that includes the associations or errors object.
85
+ */
66
86
  searchAssociations(associationStatus, pageIndex, itemsPerPage, companyNumber) {
67
87
  return __awaiter(this, void 0, void 0, function* () {
68
88
  const queryParameters = {
@@ -78,17 +98,29 @@ class AssociationsService {
78
98
  });
79
99
  }
80
100
  /**
81
- * Creates a new association for a user in session.
82
- * @param companyNumber - a company number of the company with which a new association for the user will be created.
83
- * @param inviteeEmailAddress - an email address of the user invited to have an association with a company.
84
- * @returns a promise that resolves to the HTTP response from the server that includes the new association's link (it contains the association identifier) or errors object.
101
+ * Creates a new association for a user with provided userId.
102
+ * @param companyNumber - The company number for the new association.
103
+ * @param userId - The user's unique identifier.
104
+ * @returns A promise resolving to the new association's link or errors object.
105
+ */
106
+ createAssociation(companyNumber, userId) {
107
+ return __awaiter(this, void 0, void 0, function* () {
108
+ const url = "/associations";
109
+ const body = { company_number: companyNumber, user_id: userId };
110
+ const response = yield this.client.httpPost(url, body);
111
+ return this.getResource(response);
112
+ });
113
+ }
114
+ /**
115
+ * Invites a user with the provided email address to a company.
116
+ * @param companyNumber - The company number.
117
+ * @param inviteeEmailAddress - The email address of the user to invite.
118
+ * @returns A promise resolving to the new association's link or errors object.
85
119
  */
86
- createAssociation(companyNumber, inviteeEmailAddress) {
120
+ inviteUser(companyNumber, inviteeEmailAddress) {
87
121
  return __awaiter(this, void 0, void 0, function* () {
88
- const url = inviteeEmailAddress ? "/associations/invitations" : "/associations";
89
- const body = inviteeEmailAddress
90
- ? { company_number: companyNumber, invitee_email_id: inviteeEmailAddress }
91
- : { company_number: companyNumber };
122
+ const url = "/associations/invitations";
123
+ const body = { company_number: companyNumber, invitee_email_id: inviteeEmailAddress };
92
124
  const response = yield this.client.httpPost(url, body);
93
125
  return this.getResource(response);
94
126
  });
@@ -1 +1 @@
1
- {"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/associations/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAaA,oEAA4C;AAE5C;;GAEG;AACH,MAAqB,mBAAmB;IAGpC;;;OAGG;IACH,YAA8B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAI,CAAC;IAEtD;;;;;;;;;OASG;IACU,sBAAsB,CAC/B,aAAqB,EACrB,cAAwB,EACxB,SAAkB,EAClB,YAAqB,EACrB,SAAkB,EAClB,MAAe;;YAEf,IAAI,WAAW,GAAW,EAAE,CAAC;YAC7B,IAAI,cAAc,IAAI,SAAS,IAAI,YAAY,IAAI,MAAM,EAAE;gBACvD,MAAM,eAAe,GAAoB;oBACrC,eAAe,EAAE,cAAc,IAAI,SAAS;oBAC5C,UAAU,EAAE,SAAS,IAAI,SAAS;oBAClC,cAAc,EAAE,YAAY,IAAI,SAAS;oBACzC,OAAO,EAAE,MAAM,IAAI,SAAS;iBAC/B,CAAC;gBACF,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;aACtD;YAED,IAAI,OAAgB,CAAC;YACrB,IAAI,SAAS,EAAE;gBACX,OAAO,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;aACvC;YAED,MAAM,GAAG,GAAG,2BAA2B,aAAa,GAA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AC9B,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAoB,GAAG,EAAE,KAAK,CAAC;oBACxD,CAAC,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;gBAC5B,MAAM,SAAS,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBACzC,WAAW,GAAG,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,EAAE,CAAC;aAC7D;SACJ;QACD,OAAO,WAAW,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACK,kBAAkB,CAAK,OAAe,EAAE,MAAW;QACvD,IAAI,WAAW,GAAW,EAAE,CAAC;QAC7B,IAAI,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YACxB,OAAO,EAAE,CAAC;YACV,MAAM,SAAS,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YACzC,WAAW,GAAG,GAAG,WAAW,GAAG,OAAO,IAAI,KAAK,GAAG,SAAS,EAAE,CAAC;SACjE;QACD,OAAO,WAAW,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACK,WAAW,CAAE,QAAsB;QACvC,MAAM,QAAQ,GAAmC;YAC7C,cAAc,EAAE,QAAQ,CAAC,MAAM;SAClC,CAAC;QAEF,QAAQ,CAAC,QAAQ,GAAG,iBAAO,CAAC,aAAa,CAAuB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAE/E,OAAO,QAAQ,CAAC;IACpB,CAAC;;AAlSL,sCAmSC;AAlS2B,0BAAM,GAAG,QAAQ,CAAC"}
@@ -186,3 +186,8 @@ export interface NewAssociationResponse {
186
186
  associationLink: string;
187
187
  }
188
188
  export declare type AssociationsResponse = AssociationList | Association | NewAssociationResponse | Errors;
189
+ export interface SearchForCompanyAssociationPostBody {
190
+ user_email?: string;
191
+ user_id?: string;
192
+ status?: AssociationStatus[];
193
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companieshouse/api-sdk-node",
3
- "version": "2.0.274",
3
+ "version": "2.0.276",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [