ultracart_rest_api_v2_typescript 4.0.134 → 4.0.135
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/README.md +3 -2
- package/dist/apis/ConversationApi.d.ts +27 -0
- package/dist/apis/ConversationApi.js +57 -0
- package/package.json +1 -1
- package/src/apis/ConversationApi.ts +60 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## ultracart_rest_api_v2_typescript@4.0.
|
|
1
|
+
## ultracart_rest_api_v2_typescript@4.0.135
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install ultracart_rest_api_v2_typescript@4.0.
|
|
39
|
+
npm install ultracart_rest_api_v2_typescript@4.0.135 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -54,6 +54,7 @@ Not every change is committed to every SDK.
|
|
|
54
54
|
|
|
55
55
|
| Version | Date | Comments |
|
|
56
56
|
| --: | :-: | --- |
|
|
57
|
+
| 4.0.135 | 02/17/2023 | convo api - smsUnsubscribeConversation method |
|
|
57
58
|
| 4.0.134 | 02/15/2023 | added auto order sorting by next_shipment_dts |
|
|
58
59
|
| 4.0.133 | 02/10/2023 | convo - add storefront_host_name to search request |
|
|
59
60
|
| 4.0.132 | 02/07/2023 | convo - new event for when a customer joins a queue |
|
|
@@ -72,6 +72,9 @@ export interface MarkReadConversationRequest {
|
|
|
72
72
|
export interface SearchConversationCannedMessagesRequest {
|
|
73
73
|
searchRequest: ConversationCannedMessagesSearch;
|
|
74
74
|
}
|
|
75
|
+
export interface SmsUnsubscribeConversationRequest {
|
|
76
|
+
conversationUuid: string;
|
|
77
|
+
}
|
|
75
78
|
export interface StartConversationRequest {
|
|
76
79
|
startRequest: ConversationStartRequest;
|
|
77
80
|
}
|
|
@@ -490,6 +493,20 @@ export interface ConversationApiInterface {
|
|
|
490
493
|
* Search for canned messages by short_code
|
|
491
494
|
*/
|
|
492
495
|
searchConversationCannedMessages(requestParameters: SearchConversationCannedMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationCannedMessagesResponse>;
|
|
496
|
+
/**
|
|
497
|
+
* Unsubscribe any SMS participants in this conversation
|
|
498
|
+
* @summary Unsubscribe any SMS participants in this conversation
|
|
499
|
+
* @param {string} conversationUuid
|
|
500
|
+
* @param {*} [options] Override http request option.
|
|
501
|
+
* @throws {RequiredError}
|
|
502
|
+
* @memberof ConversationApiInterface
|
|
503
|
+
*/
|
|
504
|
+
smsUnsubscribeConversationRaw(requestParameters: SmsUnsubscribeConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
505
|
+
/**
|
|
506
|
+
* Unsubscribe any SMS participants in this conversation
|
|
507
|
+
* Unsubscribe any SMS participants in this conversation
|
|
508
|
+
*/
|
|
509
|
+
smsUnsubscribeConversation(requestParameters: SmsUnsubscribeConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
493
510
|
/**
|
|
494
511
|
* Start a new conversation
|
|
495
512
|
* @summary Start a conversation
|
|
@@ -863,6 +880,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
|
|
|
863
880
|
* Search for canned messages by short_code
|
|
864
881
|
*/
|
|
865
882
|
searchConversationCannedMessages(requestParameters: SearchConversationCannedMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationCannedMessagesResponse>;
|
|
883
|
+
/**
|
|
884
|
+
* Unsubscribe any SMS participants in this conversation
|
|
885
|
+
* Unsubscribe any SMS participants in this conversation
|
|
886
|
+
*/
|
|
887
|
+
smsUnsubscribeConversationRaw(requestParameters: SmsUnsubscribeConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
888
|
+
/**
|
|
889
|
+
* Unsubscribe any SMS participants in this conversation
|
|
890
|
+
* Unsubscribe any SMS participants in this conversation
|
|
891
|
+
*/
|
|
892
|
+
smsUnsubscribeConversation(requestParameters: SmsUnsubscribeConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
866
893
|
/**
|
|
867
894
|
* Start a new conversation
|
|
868
895
|
* Start a conversation
|
|
@@ -1716,6 +1716,63 @@ var ConversationApi = /** @class */ (function (_super) {
|
|
|
1716
1716
|
});
|
|
1717
1717
|
});
|
|
1718
1718
|
};
|
|
1719
|
+
/**
|
|
1720
|
+
* Unsubscribe any SMS participants in this conversation
|
|
1721
|
+
* Unsubscribe any SMS participants in this conversation
|
|
1722
|
+
*/
|
|
1723
|
+
ConversationApi.prototype.smsUnsubscribeConversationRaw = function (requestParameters, initOverrides) {
|
|
1724
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1725
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
1726
|
+
return __generator(this, function (_c) {
|
|
1727
|
+
switch (_c.label) {
|
|
1728
|
+
case 0:
|
|
1729
|
+
if (requestParameters.conversationUuid === null || requestParameters.conversationUuid === undefined) {
|
|
1730
|
+
throw new runtime.RequiredError('conversationUuid', 'Required parameter requestParameters.conversationUuid was null or undefined when calling smsUnsubscribeConversation.');
|
|
1731
|
+
}
|
|
1732
|
+
queryParameters = {};
|
|
1733
|
+
headerParameters = {};
|
|
1734
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
1735
|
+
// oauth required
|
|
1736
|
+
_a = headerParameters;
|
|
1737
|
+
_b = "Authorization";
|
|
1738
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
|
|
1739
|
+
case 1:
|
|
1740
|
+
// oauth required
|
|
1741
|
+
_a[_b] = _c.sent();
|
|
1742
|
+
_c.label = 2;
|
|
1743
|
+
case 2:
|
|
1744
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1745
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
1746
|
+
}
|
|
1747
|
+
return [4 /*yield*/, this.request({
|
|
1748
|
+
path: "/conversation/conversations/{conversation_uuid}/sms_unsubscribe".replace("{".concat("conversation_uuid", "}"), encodeURIComponent(String(requestParameters.conversationUuid))),
|
|
1749
|
+
method: 'PUT',
|
|
1750
|
+
headers: headerParameters,
|
|
1751
|
+
query: queryParameters,
|
|
1752
|
+
}, initOverrides)];
|
|
1753
|
+
case 3:
|
|
1754
|
+
response = _c.sent();
|
|
1755
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
1756
|
+
}
|
|
1757
|
+
});
|
|
1758
|
+
});
|
|
1759
|
+
};
|
|
1760
|
+
/**
|
|
1761
|
+
* Unsubscribe any SMS participants in this conversation
|
|
1762
|
+
* Unsubscribe any SMS participants in this conversation
|
|
1763
|
+
*/
|
|
1764
|
+
ConversationApi.prototype.smsUnsubscribeConversation = function (requestParameters, initOverrides) {
|
|
1765
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1766
|
+
return __generator(this, function (_a) {
|
|
1767
|
+
switch (_a.label) {
|
|
1768
|
+
case 0: return [4 /*yield*/, this.smsUnsubscribeConversationRaw(requestParameters, initOverrides)];
|
|
1769
|
+
case 1:
|
|
1770
|
+
_a.sent();
|
|
1771
|
+
return [2 /*return*/];
|
|
1772
|
+
}
|
|
1773
|
+
});
|
|
1774
|
+
});
|
|
1775
|
+
};
|
|
1719
1776
|
/**
|
|
1720
1777
|
* Start a new conversation
|
|
1721
1778
|
* Start a conversation
|
package/package.json
CHANGED
|
@@ -189,6 +189,10 @@ export interface SearchConversationCannedMessagesRequest {
|
|
|
189
189
|
searchRequest: ConversationCannedMessagesSearch;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
+
export interface SmsUnsubscribeConversationRequest {
|
|
193
|
+
conversationUuid: string;
|
|
194
|
+
}
|
|
195
|
+
|
|
192
196
|
export interface StartConversationRequest {
|
|
193
197
|
startRequest: ConversationStartRequest;
|
|
194
198
|
}
|
|
@@ -669,6 +673,22 @@ export interface ConversationApiInterface {
|
|
|
669
673
|
*/
|
|
670
674
|
searchConversationCannedMessages(requestParameters: SearchConversationCannedMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationCannedMessagesResponse>;
|
|
671
675
|
|
|
676
|
+
/**
|
|
677
|
+
* Unsubscribe any SMS participants in this conversation
|
|
678
|
+
* @summary Unsubscribe any SMS participants in this conversation
|
|
679
|
+
* @param {string} conversationUuid
|
|
680
|
+
* @param {*} [options] Override http request option.
|
|
681
|
+
* @throws {RequiredError}
|
|
682
|
+
* @memberof ConversationApiInterface
|
|
683
|
+
*/
|
|
684
|
+
smsUnsubscribeConversationRaw(requestParameters: SmsUnsubscribeConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Unsubscribe any SMS participants in this conversation
|
|
688
|
+
* Unsubscribe any SMS participants in this conversation
|
|
689
|
+
*/
|
|
690
|
+
smsUnsubscribeConversation(requestParameters: SmsUnsubscribeConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
691
|
+
|
|
672
692
|
/**
|
|
673
693
|
* Start a new conversation
|
|
674
694
|
* @summary Start a conversation
|
|
@@ -1922,6 +1942,46 @@ export class ConversationApi extends runtime.BaseAPI implements ConversationApiI
|
|
|
1922
1942
|
return await response.value();
|
|
1923
1943
|
}
|
|
1924
1944
|
|
|
1945
|
+
/**
|
|
1946
|
+
* Unsubscribe any SMS participants in this conversation
|
|
1947
|
+
* Unsubscribe any SMS participants in this conversation
|
|
1948
|
+
*/
|
|
1949
|
+
async smsUnsubscribeConversationRaw(requestParameters: SmsUnsubscribeConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
1950
|
+
if (requestParameters.conversationUuid === null || requestParameters.conversationUuid === undefined) {
|
|
1951
|
+
throw new runtime.RequiredError('conversationUuid','Required parameter requestParameters.conversationUuid was null or undefined when calling smsUnsubscribeConversation.');
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
const queryParameters: any = {};
|
|
1955
|
+
|
|
1956
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1957
|
+
|
|
1958
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1959
|
+
// oauth required
|
|
1960
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["conversation_write"]);
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1964
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
const response = await this.request({
|
|
1968
|
+
path: `/conversation/conversations/{conversation_uuid}/sms_unsubscribe`.replace(`{${"conversation_uuid"}}`, encodeURIComponent(String(requestParameters.conversationUuid))),
|
|
1969
|
+
method: 'PUT',
|
|
1970
|
+
headers: headerParameters,
|
|
1971
|
+
query: queryParameters,
|
|
1972
|
+
}, initOverrides);
|
|
1973
|
+
|
|
1974
|
+
return new runtime.VoidApiResponse(response);
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
/**
|
|
1978
|
+
* Unsubscribe any SMS participants in this conversation
|
|
1979
|
+
* Unsubscribe any SMS participants in this conversation
|
|
1980
|
+
*/
|
|
1981
|
+
async smsUnsubscribeConversation(requestParameters: SmsUnsubscribeConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
1982
|
+
await this.smsUnsubscribeConversationRaw(requestParameters, initOverrides);
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1925
1985
|
/**
|
|
1926
1986
|
* Start a new conversation
|
|
1927
1987
|
* Start a conversation
|