@stream-io/node-sdk 0.1.0

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 (101) hide show
  1. package/.readme-assets/Github-Graphic-JS.jpg +0 -0
  2. package/LICENSE +219 -0
  3. package/README.md +29 -0
  4. package/dist/__tests__/block-lists.test.d.ts +1 -0
  5. package/dist/__tests__/call-members.test.d.ts +1 -0
  6. package/dist/__tests__/call-types.test.d.ts +1 -0
  7. package/dist/__tests__/call.test.d.ts +1 -0
  8. package/dist/__tests__/channel-types.test.d.ts +1 -0
  9. package/dist/__tests__/channel.test.d.ts +1 -0
  10. package/dist/__tests__/command.test.d.ts +1 -0
  11. package/dist/__tests__/create-token.test.d.ts +1 -0
  12. package/dist/__tests__/devices-push.test.d.ts +1 -0
  13. package/dist/__tests__/messages.test.d.ts +1 -0
  14. package/dist/__tests__/permissions-app-settings.test.d.ts +1 -0
  15. package/dist/__tests__/user-compat.test.d.ts +1 -0
  16. package/dist/__tests__/users.test.d.ts +1 -0
  17. package/dist/index.cjs.js +8789 -0
  18. package/dist/index.cjs.js.map +1 -0
  19. package/dist/index.d.ts +7 -0
  20. package/dist/index.es.js +8708 -0
  21. package/dist/index.es.js.map +1 -0
  22. package/dist/src/StreamCall.d.ts +37 -0
  23. package/dist/src/StreamChannel.d.ts +39 -0
  24. package/dist/src/StreamChatClient.d.ts +31 -0
  25. package/dist/src/StreamClient.d.ts +68 -0
  26. package/dist/src/StreamVideoClient.d.ts +16 -0
  27. package/dist/src/gen/chat/apis/ChannelTypesApi.d.ts +81 -0
  28. package/dist/src/gen/chat/apis/ChannelsApi.d.ts +308 -0
  29. package/dist/src/gen/chat/apis/CustomCommandsApi.d.ts +81 -0
  30. package/dist/src/gen/chat/apis/DefaultApi.d.ts +60 -0
  31. package/dist/src/gen/chat/apis/DevicesApi.d.ts +58 -0
  32. package/dist/src/gen/chat/apis/EventsApi.d.ts +64 -0
  33. package/dist/src/gen/chat/apis/FilesApi.d.ts +81 -0
  34. package/dist/src/gen/chat/apis/GDPRApi.d.ts +114 -0
  35. package/dist/src/gen/chat/apis/ImportsApi.d.ts +67 -0
  36. package/dist/src/gen/chat/apis/MessagesApi.d.ts +370 -0
  37. package/dist/src/gen/chat/apis/ModerationApi.d.ts +271 -0
  38. package/dist/src/gen/chat/apis/PermissionsV2Api.d.ts +77 -0
  39. package/dist/src/gen/chat/apis/PushApi.d.ts +65 -0
  40. package/dist/src/gen/chat/apis/ReactionsApi.d.ts +62 -0
  41. package/dist/src/gen/chat/apis/ServerSideApi.d.ts +31 -0
  42. package/dist/src/gen/chat/apis/SettingsApi.d.ts +257 -0
  43. package/dist/src/gen/chat/apis/TasksApi.d.ts +31 -0
  44. package/dist/src/gen/chat/apis/TestingApi.d.ts +57 -0
  45. package/dist/src/gen/chat/apis/UsersApi.d.ts +313 -0
  46. package/dist/src/gen/chat/apis/index.d.ts +19 -0
  47. package/dist/src/gen/chat/index.d.ts +3 -0
  48. package/dist/src/gen/chat/models/index.d.ts +15624 -0
  49. package/dist/src/gen/chat/runtime.d.ts +180 -0
  50. package/dist/src/gen/video/apis/DefaultApi.d.ts +505 -0
  51. package/dist/src/gen/video/apis/ServerSideApi.d.ts +81 -0
  52. package/dist/src/gen/video/apis/index.d.ts +2 -0
  53. package/dist/src/gen/video/index.d.ts +3 -0
  54. package/dist/src/gen/video/models/index.d.ts +4733 -0
  55. package/dist/src/gen/video/runtime.d.ts +180 -0
  56. package/dist/src/types.d.ts +1 -0
  57. package/dist/src/utils/create-token.d.ts +3 -0
  58. package/index.ts +7 -0
  59. package/package.json +47 -0
  60. package/src/StreamCall.ts +161 -0
  61. package/src/StreamChannel.ts +165 -0
  62. package/src/StreamChatClient.ts +102 -0
  63. package/src/StreamClient.ts +440 -0
  64. package/src/StreamVideoClient.ts +63 -0
  65. package/src/gen/chat/.openapi-generator/FILES +24 -0
  66. package/src/gen/chat/.openapi-generator/VERSION +1 -0
  67. package/src/gen/chat/.openapi-generator-ignore +23 -0
  68. package/src/gen/chat/apis/ChannelTypesApi.ts +275 -0
  69. package/src/gen/chat/apis/ChannelsApi.ts +1221 -0
  70. package/src/gen/chat/apis/CustomCommandsApi.ts +276 -0
  71. package/src/gen/chat/apis/DefaultApi.ts +196 -0
  72. package/src/gen/chat/apis/DevicesApi.ts +180 -0
  73. package/src/gen/chat/apis/EventsApi.ts +220 -0
  74. package/src/gen/chat/apis/FilesApi.ts +312 -0
  75. package/src/gen/chat/apis/GDPRApi.ts +418 -0
  76. package/src/gen/chat/apis/ImportsApi.ts +222 -0
  77. package/src/gen/chat/apis/MessagesApi.ts +1475 -0
  78. package/src/gen/chat/apis/ModerationApi.ts +1038 -0
  79. package/src/gen/chat/apis/PermissionsV2Api.ts +259 -0
  80. package/src/gen/chat/apis/PushApi.ts +183 -0
  81. package/src/gen/chat/apis/ReactionsApi.ts +202 -0
  82. package/src/gen/chat/apis/ServerSideApi.ts +79 -0
  83. package/src/gen/chat/apis/SettingsApi.ts +948 -0
  84. package/src/gen/chat/apis/TasksApi.ts +75 -0
  85. package/src/gen/chat/apis/TestingApi.ts +185 -0
  86. package/src/gen/chat/apis/UsersApi.ts +1203 -0
  87. package/src/gen/chat/apis/index.ts +30 -0
  88. package/src/gen/chat/index.ts +5 -0
  89. package/src/gen/chat/models/index.ts +15541 -0
  90. package/src/gen/chat/runtime.ts +415 -0
  91. package/src/gen/video/.openapi-generator/FILES +7 -0
  92. package/src/gen/video/.openapi-generator/VERSION +1 -0
  93. package/src/gen/video/.openapi-generator-ignore +23 -0
  94. package/src/gen/video/apis/DefaultApi.ts +1997 -0
  95. package/src/gen/video/apis/ServerSideApi.ts +276 -0
  96. package/src/gen/video/apis/index.ts +4 -0
  97. package/src/gen/video/index.ts +5 -0
  98. package/src/gen/video/models/index.ts +4642 -0
  99. package/src/gen/video/runtime.ts +415 -0
  100. package/src/types.ts +1 -0
  101. package/src/utils/create-token.ts +49 -0
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Stream Chat API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v89.9.2
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ APIError,
19
+ GetTaskResponse,
20
+ } from '../models';
21
+
22
+ export interface GetTaskRequest {
23
+ id: string;
24
+ }
25
+
26
+ /**
27
+ *
28
+ */
29
+ export class TasksApi extends runtime.BaseAPI {
30
+
31
+ /**
32
+ * Gets status of a task
33
+ * Get status of a task
34
+ */
35
+ async getTaskRaw(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetTaskResponse>> {
36
+ if (requestParameters.id === null || requestParameters.id === undefined) {
37
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getTask.');
38
+ }
39
+
40
+ const queryParameters: any = {};
41
+
42
+ const headerParameters: runtime.HTTPHeaders = {};
43
+
44
+ if (this.configuration && this.configuration.apiKey) {
45
+ headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
46
+ }
47
+
48
+ if (this.configuration && this.configuration.apiKey) {
49
+ queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
50
+ }
51
+
52
+ if (this.configuration && this.configuration.apiKey) {
53
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
54
+ }
55
+
56
+ const response = await this.request({
57
+ path: `/tasks/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
58
+ method: 'GET',
59
+ headers: headerParameters,
60
+ query: queryParameters,
61
+ }, initOverrides);
62
+
63
+ return new runtime.JSONApiResponse(response);
64
+ }
65
+
66
+ /**
67
+ * Gets status of a task
68
+ * Get status of a task
69
+ */
70
+ async getTask(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetTaskResponse> {
71
+ const response = await this.getTaskRaw(requestParameters, initOverrides);
72
+ return await response.value();
73
+ }
74
+
75
+ }
@@ -0,0 +1,185 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Stream Chat API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v89.9.2
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ APIError,
19
+ CheckPushRequest,
20
+ CheckPushResponse,
21
+ CheckSNSRequest,
22
+ CheckSNSResponse,
23
+ CheckSQSRequest,
24
+ CheckSQSResponse,
25
+ } from '../models';
26
+
27
+ export interface CheckPushOperationRequest {
28
+ checkPushRequest: CheckPushRequest | null;
29
+ }
30
+
31
+ export interface CheckSNSOperationRequest {
32
+ checkSNSRequest: CheckSNSRequest | null;
33
+ }
34
+
35
+ export interface CheckSQSOperationRequest {
36
+ checkSQSRequest: CheckSQSRequest | null;
37
+ }
38
+
39
+ /**
40
+ *
41
+ */
42
+ export class TestingApi extends runtime.BaseAPI {
43
+
44
+ /**
45
+ * Sends a test message via push, this is a test endpoint to verify your push settings
46
+ * Check push
47
+ */
48
+ async checkPushRaw(requestParameters: CheckPushOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CheckPushResponse>> {
49
+ if (requestParameters.checkPushRequest === null || requestParameters.checkPushRequest === undefined) {
50
+ throw new runtime.RequiredError('checkPushRequest','Required parameter requestParameters.checkPushRequest was null or undefined when calling checkPush.');
51
+ }
52
+
53
+ const queryParameters: any = {};
54
+
55
+ const headerParameters: runtime.HTTPHeaders = {};
56
+
57
+ headerParameters['Content-Type'] = 'application/json';
58
+
59
+ if (this.configuration && this.configuration.apiKey) {
60
+ headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
61
+ }
62
+
63
+ if (this.configuration && this.configuration.apiKey) {
64
+ queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
65
+ }
66
+
67
+ if (this.configuration && this.configuration.apiKey) {
68
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
69
+ }
70
+
71
+ const response = await this.request({
72
+ path: `/check_push`,
73
+ method: 'POST',
74
+ headers: headerParameters,
75
+ query: queryParameters,
76
+ body: requestParameters.checkPushRequest,
77
+ }, initOverrides);
78
+
79
+ return new runtime.JSONApiResponse(response);
80
+ }
81
+
82
+ /**
83
+ * Sends a test message via push, this is a test endpoint to verify your push settings
84
+ * Check push
85
+ */
86
+ async checkPush(requestParameters: CheckPushOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CheckPushResponse> {
87
+ const response = await this.checkPushRaw(requestParameters, initOverrides);
88
+ return await response.value();
89
+ }
90
+
91
+ /**
92
+ * Validates Amazon SNS configuration
93
+ * Check SNS
94
+ */
95
+ async checkSNSRaw(requestParameters: CheckSNSOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CheckSNSResponse>> {
96
+ if (requestParameters.checkSNSRequest === null || requestParameters.checkSNSRequest === undefined) {
97
+ throw new runtime.RequiredError('checkSNSRequest','Required parameter requestParameters.checkSNSRequest was null or undefined when calling checkSNS.');
98
+ }
99
+
100
+ const queryParameters: any = {};
101
+
102
+ const headerParameters: runtime.HTTPHeaders = {};
103
+
104
+ headerParameters['Content-Type'] = 'application/json';
105
+
106
+ if (this.configuration && this.configuration.apiKey) {
107
+ headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
108
+ }
109
+
110
+ if (this.configuration && this.configuration.apiKey) {
111
+ queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
112
+ }
113
+
114
+ if (this.configuration && this.configuration.apiKey) {
115
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
116
+ }
117
+
118
+ const response = await this.request({
119
+ path: `/check_sns`,
120
+ method: 'POST',
121
+ headers: headerParameters,
122
+ query: queryParameters,
123
+ body: requestParameters.checkSNSRequest,
124
+ }, initOverrides);
125
+
126
+ return new runtime.JSONApiResponse(response);
127
+ }
128
+
129
+ /**
130
+ * Validates Amazon SNS configuration
131
+ * Check SNS
132
+ */
133
+ async checkSNS(requestParameters: CheckSNSOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CheckSNSResponse> {
134
+ const response = await this.checkSNSRaw(requestParameters, initOverrides);
135
+ return await response.value();
136
+ }
137
+
138
+ /**
139
+ * Validates Amazon SQS credentials
140
+ * Check SQS
141
+ */
142
+ async checkSQSRaw(requestParameters: CheckSQSOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CheckSQSResponse>> {
143
+ if (requestParameters.checkSQSRequest === null || requestParameters.checkSQSRequest === undefined) {
144
+ throw new runtime.RequiredError('checkSQSRequest','Required parameter requestParameters.checkSQSRequest was null or undefined when calling checkSQS.');
145
+ }
146
+
147
+ const queryParameters: any = {};
148
+
149
+ const headerParameters: runtime.HTTPHeaders = {};
150
+
151
+ headerParameters['Content-Type'] = 'application/json';
152
+
153
+ if (this.configuration && this.configuration.apiKey) {
154
+ headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
155
+ }
156
+
157
+ if (this.configuration && this.configuration.apiKey) {
158
+ queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
159
+ }
160
+
161
+ if (this.configuration && this.configuration.apiKey) {
162
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
163
+ }
164
+
165
+ const response = await this.request({
166
+ path: `/check_sqs`,
167
+ method: 'POST',
168
+ headers: headerParameters,
169
+ query: queryParameters,
170
+ body: requestParameters.checkSQSRequest,
171
+ }, initOverrides);
172
+
173
+ return new runtime.JSONApiResponse(response);
174
+ }
175
+
176
+ /**
177
+ * Validates Amazon SQS credentials
178
+ * Check SQS
179
+ */
180
+ async checkSQS(requestParameters: CheckSQSOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CheckSQSResponse> {
181
+ const response = await this.checkSQSRaw(requestParameters, initOverrides);
182
+ return await response.value();
183
+ }
184
+
185
+ }