glitch-javascript-sdk 2.7.3 → 2.7.5

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/dist/index.d.ts CHANGED
@@ -164,6 +164,13 @@ declare class AccessKeys {
164
164
  * @returns promise
165
165
  */
166
166
  static delete<T>(key_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
167
+ /**
168
+ * Emails the assigned key to the influencer.
169
+ *
170
+ * @param key_id The UUID of the access key.
171
+ * @returns promise
172
+ */
173
+ static sendEmail<T>(key_id: string): AxiosPromise<Response<T>>;
167
174
  }
168
175
 
169
176
  declare class Competitions {
@@ -7464,6 +7471,14 @@ declare class Crm {
7464
7471
  * Get the analytics on what users indcated they were interested in.
7465
7472
  */
7466
7473
  static getInterestStats<T>(): AxiosPromise<Response<T>>;
7474
+ /**
7475
+ * Update an existing contact's information.
7476
+ */
7477
+ static updateContact<T>(contact_id: string, data: object): AxiosPromise<Response<T>>;
7478
+ /**
7479
+ * Remove a contact from a lead.
7480
+ */
7481
+ static deleteContact<T>(contact_id: string): AxiosPromise<Response<T>>;
7467
7482
  }
7468
7483
 
7469
7484
  interface Route {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.7.3",
3
+ "version": "2.7.5",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -44,6 +44,16 @@ class AccessKeys {
44
44
  public static delete<T>(key_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
45
45
  return Requests.processRoute(AccessKeysRoute.routes.delete, {}, { key_id }, params);
46
46
  }
47
+
48
+ /**
49
+ * Emails the assigned key to the influencer.
50
+ *
51
+ * @param key_id The UUID of the access key.
52
+ * @returns promise
53
+ */
54
+ public static sendEmail<T>(key_id: string): AxiosPromise<Response<T>> {
55
+ return Requests.processRoute(AccessKeysRoute.routes.sendEmail, {}, { key_id });
56
+ }
47
57
  }
48
58
 
49
59
  export default AccessKeys;
package/src/api/Crm.ts CHANGED
@@ -136,6 +136,21 @@ class Crm {
136
136
  public static getInterestStats<T>(): AxiosPromise<Response<T>> {
137
137
  return Requests.processRoute(CrmRoute.routes.getInterestStats);
138
138
  }
139
+
140
+ /**
141
+ * Update an existing contact's information.
142
+ */
143
+ public static updateContact<T>(contact_id: string, data: object): AxiosPromise<Response<T>> {
144
+ return Requests.processRoute(CrmRoute.routes.updateContact, data, { contact_id });
145
+ }
146
+
147
+ /**
148
+ * Remove a contact from a lead.
149
+ */
150
+ public static deleteContact<T>(contact_id: string): AxiosPromise<Response<T>> {
151
+ return Requests.processRoute(CrmRoute.routes.deleteContact, {}, { contact_id });
152
+ }
153
+
139
154
  }
140
155
 
141
156
  export default Crm;
@@ -7,6 +7,7 @@ class AccessKeysRoute {
7
7
  list: { url: '/titles/{title_id}/keys', method: HTTP_METHODS.GET },
8
8
  store: { url: '/titles/{title_id}/keys', method: HTTP_METHODS.POST },
9
9
  delete: { url: '/keys/{key_id}', method: HTTP_METHODS.DELETE },
10
+ sendEmail: { url: '/keys/{key_id}/send-email', method: HTTP_METHODS.POST },
10
11
  };
11
12
 
12
13
  }
@@ -21,6 +21,9 @@ class CrmRoute {
21
21
  recordStaffReply: { url: '/admin/crm/leads/{lead_id}/replied', method: HTTP_METHODS.POST },
22
22
  bulkApprove: { url: '/admin/crm/contacts/bulk-approve', method: HTTP_METHODS.POST },
23
23
 
24
+ updateContact: { url: '/admin/crm/contacts/{contact_id}', method: HTTP_METHODS.PUT },
25
+ deleteContact: { url: '/admin/crm/contacts/{contact_id}', method: HTTP_METHODS.DELETE },
26
+
24
27
  // Automation Triggers
25
28
  triggerSourcing: { url: '/admin/crm/automation/source', method: HTTP_METHODS.POST },
26
29
  triggerSync: { url: '/admin/crm/automation/sync', method: HTTP_METHODS.POST },