@wildix/stream-client 4.0.2 → 4.0.4

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.
@@ -38,6 +38,10 @@ class StreamServiceClient extends client_2.Client {
38
38
  httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultStreamServiceHttpAuthSchemeParametersProvider,
39
39
  identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({
40
40
  "smithy.api#httpBearerAuth": config.token,
41
+ "wildix.auth#apiKeys": config.token,
42
+ "wildix.auth#pbx": config.token,
43
+ "wildix.auth#s2s": config.token,
44
+ "wildix.auth#xbs": config.token,
41
45
  }),
42
46
  }));
43
47
  this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
@@ -24,6 +24,26 @@ const getRuntimeConfig = (config) => {
24
24
  identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"),
25
25
  signer: new core_1.HttpBearerAuthSigner(),
26
26
  },
27
+ {
28
+ schemeId: "wildix.auth#apiKeys",
29
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#apiKeys"),
30
+ signer: new core_1.HttpBearerAuthSigner(),
31
+ },
32
+ {
33
+ schemeId: "wildix.auth#pbx",
34
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#pbx"),
35
+ signer: new core_1.HttpBearerAuthSigner(),
36
+ },
37
+ {
38
+ schemeId: "wildix.auth#s2s",
39
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#s2s"),
40
+ signer: new core_1.HttpBearerAuthSigner(),
41
+ },
42
+ {
43
+ schemeId: "wildix.auth#xbs",
44
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#xbs"),
45
+ signer: new core_1.HttpBearerAuthSigner(),
46
+ },
27
47
  ],
28
48
  logger: config?.logger ?? new client_1.NoOpLogger(),
29
49
  protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
@@ -380,6 +380,7 @@ const _pA = "pinnedAt";
380
380
  const _pB = "pinnedBy";
381
381
  const _pC = "pictureColor";
382
382
  const _pDU = "presignedDownloadUrl";
383
+ const _pMI = "pinnedMessageIds";
383
384
  const _pUU = "presignedUploadUrl";
384
385
  const _ph = "phone";
385
386
  const _pi = "picture";
@@ -629,8 +630,8 @@ exports.ButtonReplyHandler$ = [3, n1, _BRH,
629
630
  ];
630
631
  exports.Channel$ = [3, n1, _C,
631
632
  0,
632
- [_cI, _cT, _mC, _cA, _cB, _cV, _lAA, _uA, _lM, _co, _k, _kT, _kV, _kSN, _kDS, _ser, _sR, _te, _ex, _su, _de, _pi, _pC, _ac, _b, _con, _wS, _sm, _mm, _w, _kA, _sT, _aI, _aR, _tL, _wGVO],
633
- [0, 0, 1, 0, 0, 1, 0, 0, () => exports.LastMessagePreview$, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, () => exports.ChannelContext$, 0, 2, 2, 2, 0, 0, 0, 2, 0, 2], 7
633
+ [_cI, _cT, _mC, _cA, _cB, _cV, _lAA, _uA, _lM, _co, _k, _kT, _kV, _kSN, _kDS, _ser, _sR, _te, _ex, _pMI, _su, _de, _pi, _pC, _ac, _b, _con, _wS, _sm, _mm, _w, _kA, _sT, _aI, _aR, _tL, _wGVO],
634
+ [0, 0, 1, 0, 0, 1, 0, 0, () => exports.LastMessagePreview$, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 64 | 0, 0, 0, 0, 0, 0, 2, () => exports.ChannelContext$, 0, 2, 2, 2, 0, 0, 0, 2, 0, 2], 7
634
635
  ];
635
636
  exports.ChannelContext$ = [3, n1, _CC,
636
637
  0,
@@ -909,8 +910,8 @@ exports.HideChannelOutput$ = [3, n1, _HCO,
909
910
  ];
910
911
  exports.InboxChannel$ = [3, n1, _IC,
911
912
  0,
912
- [_cI, _cT, _mC, _cA, _cB, _cV, _lAA, _in, _uA, _lM, _co, _k, _kT, _kV, _kSN, _kDS, _ser, _sR, _te, _ex, _su, _de, _pi, _pC, _ac, _b, _con, _wS, _sm, _mm, _w, _kA, _sT, _aI, _aR, _tL, _wGVO],
913
- [0, 0, 1, 0, 0, 1, 0, () => exports.InboxState$, 0, () => exports.LastMessagePreview$, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, () => exports.ChannelContext$, 0, 2, 2, 2, 0, 0, 0, 2, 0, 2], 8
913
+ [_cI, _cT, _mC, _cA, _cB, _cV, _lAA, _in, _uA, _lM, _co, _k, _kT, _kV, _kSN, _kDS, _ser, _sR, _te, _ex, _pMI, _su, _de, _pi, _pC, _ac, _b, _con, _wS, _sm, _mm, _w, _kA, _sT, _aI, _aR, _tL, _wGVO],
914
+ [0, 0, 1, 0, 0, 1, 0, () => exports.InboxState$, 0, () => exports.LastMessagePreview$, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 64 | 0, 0, 0, 0, 0, 0, 2, () => exports.ChannelContext$, 0, 2, 2, 2, 0, 0, 0, 2, 0, 2], 8
914
915
  ];
915
916
  exports.InboxState$ = [3, n1, _IS,
916
917
  0,
@@ -1414,6 +1415,7 @@ var MessageList = [1, n1, _ML,
1414
1415
  ];
1415
1416
  var MessageUnsetFieldsList = 64 | 0;
1416
1417
  var MimeTypeList = 64 | 0;
1418
+ var PinnedMessageIdList = 64 | 0;
1417
1419
  var ReactionList = [1, n1, _RL,
1418
1420
  0, () => exports.Reaction$
1419
1421
  ];
@@ -35,6 +35,10 @@ export class StreamServiceClient extends __Client {
35
35
  httpAuthSchemeParametersProvider: defaultStreamServiceHttpAuthSchemeParametersProvider,
36
36
  identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
37
37
  "smithy.api#httpBearerAuth": config.token,
38
+ "wildix.auth#apiKeys": config.token,
39
+ "wildix.auth#pbx": config.token,
40
+ "wildix.auth#s2s": config.token,
41
+ "wildix.auth#xbs": config.token,
38
42
  }),
39
43
  }));
40
44
  this.middlewareStack.use(getHttpSigningPlugin(this.config));
@@ -21,6 +21,26 @@ export const getRuntimeConfig = (config) => {
21
21
  identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"),
22
22
  signer: new HttpBearerAuthSigner(),
23
23
  },
24
+ {
25
+ schemeId: "wildix.auth#apiKeys",
26
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#apiKeys"),
27
+ signer: new HttpBearerAuthSigner(),
28
+ },
29
+ {
30
+ schemeId: "wildix.auth#pbx",
31
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#pbx"),
32
+ signer: new HttpBearerAuthSigner(),
33
+ },
34
+ {
35
+ schemeId: "wildix.auth#s2s",
36
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#s2s"),
37
+ signer: new HttpBearerAuthSigner(),
38
+ },
39
+ {
40
+ schemeId: "wildix.auth#xbs",
41
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#xbs"),
42
+ signer: new HttpBearerAuthSigner(),
43
+ },
24
44
  ],
25
45
  logger: config?.logger ?? new NoOpLogger(),
26
46
  protocol: config?.protocol ?? AwsRestJsonProtocol,
@@ -373,6 +373,7 @@ const _pA = "pinnedAt";
373
373
  const _pB = "pinnedBy";
374
374
  const _pC = "pictureColor";
375
375
  const _pDU = "presignedDownloadUrl";
376
+ const _pMI = "pinnedMessageIds";
376
377
  const _pUU = "presignedUploadUrl";
377
378
  const _ph = "phone";
378
379
  const _pi = "picture";
@@ -622,8 +623,8 @@ export var ButtonReplyHandler$ = [3, n1, _BRH,
622
623
  ];
623
624
  export var Channel$ = [3, n1, _C,
624
625
  0,
625
- [_cI, _cT, _mC, _cA, _cB, _cV, _lAA, _uA, _lM, _co, _k, _kT, _kV, _kSN, _kDS, _ser, _sR, _te, _ex, _su, _de, _pi, _pC, _ac, _b, _con, _wS, _sm, _mm, _w, _kA, _sT, _aI, _aR, _tL, _wGVO],
626
- [0, 0, 1, 0, 0, 1, 0, 0, () => LastMessagePreview$, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, () => ChannelContext$, 0, 2, 2, 2, 0, 0, 0, 2, 0, 2], 7
626
+ [_cI, _cT, _mC, _cA, _cB, _cV, _lAA, _uA, _lM, _co, _k, _kT, _kV, _kSN, _kDS, _ser, _sR, _te, _ex, _pMI, _su, _de, _pi, _pC, _ac, _b, _con, _wS, _sm, _mm, _w, _kA, _sT, _aI, _aR, _tL, _wGVO],
627
+ [0, 0, 1, 0, 0, 1, 0, 0, () => LastMessagePreview$, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 64 | 0, 0, 0, 0, 0, 0, 2, () => ChannelContext$, 0, 2, 2, 2, 0, 0, 0, 2, 0, 2], 7
627
628
  ];
628
629
  export var ChannelContext$ = [3, n1, _CC,
629
630
  0,
@@ -902,8 +903,8 @@ export var HideChannelOutput$ = [3, n1, _HCO,
902
903
  ];
903
904
  export var InboxChannel$ = [3, n1, _IC,
904
905
  0,
905
- [_cI, _cT, _mC, _cA, _cB, _cV, _lAA, _in, _uA, _lM, _co, _k, _kT, _kV, _kSN, _kDS, _ser, _sR, _te, _ex, _su, _de, _pi, _pC, _ac, _b, _con, _wS, _sm, _mm, _w, _kA, _sT, _aI, _aR, _tL, _wGVO],
906
- [0, 0, 1, 0, 0, 1, 0, () => InboxState$, 0, () => LastMessagePreview$, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, () => ChannelContext$, 0, 2, 2, 2, 0, 0, 0, 2, 0, 2], 8
906
+ [_cI, _cT, _mC, _cA, _cB, _cV, _lAA, _in, _uA, _lM, _co, _k, _kT, _kV, _kSN, _kDS, _ser, _sR, _te, _ex, _pMI, _su, _de, _pi, _pC, _ac, _b, _con, _wS, _sm, _mm, _w, _kA, _sT, _aI, _aR, _tL, _wGVO],
907
+ [0, 0, 1, 0, 0, 1, 0, () => InboxState$, 0, () => LastMessagePreview$, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 64 | 0, 0, 0, 0, 0, 0, 2, () => ChannelContext$, 0, 2, 2, 2, 0, 0, 0, 2, 0, 2], 8
907
908
  ];
908
909
  export var InboxState$ = [3, n1, _IS,
909
910
  0,
@@ -1407,6 +1408,7 @@ var MessageList = [1, n1, _ML,
1407
1408
  ];
1408
1409
  var MessageUnsetFieldsList = 64 | 0;
1409
1410
  var MimeTypeList = 64 | 0;
1411
+ var PinnedMessageIdList = 64 | 0;
1410
1412
  var ReactionList = [1, n1, _RL,
1411
1413
  0, () => Reaction$
1412
1414
  ];
@@ -122,6 +122,9 @@ declare const CreateGroupChannelCommand_base: {
122
122
  * // serviceRecipient: "STRING_VALUE",
123
123
  * // telephony: true || false,
124
124
  * // external: true || false,
125
+ * // pinnedMessageIds: [ // PinnedMessageIdList
126
+ * // "STRING_VALUE",
127
+ * // ],
125
128
  * // subject: "STRING_VALUE",
126
129
  * // description: "STRING_VALUE",
127
130
  * // picture: "STRING_VALUE",
@@ -210,6 +210,9 @@ declare const CreateKiteChannelCommand_base: {
210
210
  * // serviceRecipient: "STRING_VALUE",
211
211
  * // telephony: true || false,
212
212
  * // external: true || false,
213
+ * // pinnedMessageIds: [ // PinnedMessageIdList
214
+ * // "STRING_VALUE",
215
+ * // ],
213
216
  * // subject: "STRING_VALUE",
214
217
  * // description: "STRING_VALUE",
215
218
  * // picture: "STRING_VALUE",
@@ -71,6 +71,9 @@ declare const GetChannelCommand_base: {
71
71
  * // serviceRecipient: "STRING_VALUE",
72
72
  * // telephony: true || false,
73
73
  * // external: true || false,
74
+ * // pinnedMessageIds: [ // PinnedMessageIdList
75
+ * // "STRING_VALUE",
76
+ * // ],
74
77
  * // subject: "STRING_VALUE",
75
78
  * // description: "STRING_VALUE",
76
79
  * // picture: "STRING_VALUE",
@@ -71,6 +71,9 @@ declare const GetInboxCommand_base: {
71
71
  * // serviceRecipient: "STRING_VALUE",
72
72
  * // telephony: true || false,
73
73
  * // external: true || false,
74
+ * // pinnedMessageIds: [ // PinnedMessageIdList
75
+ * // "STRING_VALUE",
76
+ * // ],
74
77
  * // subject: "STRING_VALUE",
75
78
  * // description: "STRING_VALUE",
76
79
  * // picture: "STRING_VALUE",
@@ -77,6 +77,9 @@ declare const GetOrCreateDirectChannelCommand_base: {
77
77
  * // serviceRecipient: "STRING_VALUE",
78
78
  * // telephony: true || false,
79
79
  * // external: true || false,
80
+ * // pinnedMessageIds: [ // PinnedMessageIdList
81
+ * // "STRING_VALUE",
82
+ * // ],
80
83
  * // subject: "STRING_VALUE",
81
84
  * // description: "STRING_VALUE",
82
85
  * // picture: "STRING_VALUE",
@@ -74,6 +74,9 @@ declare const GetOrCreateSmsChannelCommand_base: {
74
74
  * // serviceRecipient: "STRING_VALUE",
75
75
  * // telephony: true || false,
76
76
  * // external: true || false,
77
+ * // pinnedMessageIds: [ // PinnedMessageIdList
78
+ * // "STRING_VALUE",
79
+ * // ],
77
80
  * // subject: "STRING_VALUE",
78
81
  * // description: "STRING_VALUE",
79
82
  * // picture: "STRING_VALUE",
@@ -73,6 +73,9 @@ declare const GetOrCreateTelephonyChannelCommand_base: {
73
73
  * // serviceRecipient: "STRING_VALUE",
74
74
  * // telephony: true || false,
75
75
  * // external: true || false,
76
+ * // pinnedMessageIds: [ // PinnedMessageIdList
77
+ * // "STRING_VALUE",
78
+ * // ],
76
79
  * // subject: "STRING_VALUE",
77
80
  * // description: "STRING_VALUE",
78
81
  * // picture: "STRING_VALUE",
@@ -74,6 +74,9 @@ declare const GetOrCreateWhatsAppChannelCommand_base: {
74
74
  * // serviceRecipient: "STRING_VALUE",
75
75
  * // telephony: true || false,
76
76
  * // external: true || false,
77
+ * // pinnedMessageIds: [ // PinnedMessageIdList
78
+ * // "STRING_VALUE",
79
+ * // ],
77
80
  * // subject: "STRING_VALUE",
78
81
  * // description: "STRING_VALUE",
79
82
  * // picture: "STRING_VALUE",
@@ -72,6 +72,9 @@ declare const JoinChannelCommand_base: {
72
72
  * // serviceRecipient: "STRING_VALUE",
73
73
  * // telephony: true || false,
74
74
  * // external: true || false,
75
+ * // pinnedMessageIds: [ // PinnedMessageIdList
76
+ * // "STRING_VALUE",
77
+ * // ],
75
78
  * // subject: "STRING_VALUE",
76
79
  * // description: "STRING_VALUE",
77
80
  * // picture: "STRING_VALUE",
@@ -74,6 +74,9 @@ declare const ListChannelsCommand_base: {
74
74
  * // serviceRecipient: "STRING_VALUE",
75
75
  * // telephony: true || false,
76
76
  * // external: true || false,
77
+ * // pinnedMessageIds: [ // PinnedMessageIdList
78
+ * // "STRING_VALUE",
79
+ * // ],
77
80
  * // subject: "STRING_VALUE",
78
81
  * // description: "STRING_VALUE",
79
82
  * // picture: "STRING_VALUE",
@@ -116,6 +116,9 @@ declare const PartialUpdateChannelCommand_base: {
116
116
  * // serviceRecipient: "STRING_VALUE",
117
117
  * // telephony: true || false,
118
118
  * // external: true || false,
119
+ * // pinnedMessageIds: [ // PinnedMessageIdList
120
+ * // "STRING_VALUE",
121
+ * // ],
119
122
  * // subject: "STRING_VALUE",
120
123
  * // description: "STRING_VALUE",
121
124
  * // picture: "STRING_VALUE",
@@ -76,6 +76,9 @@ declare const QueryChannelsCommand_base: {
76
76
  * // serviceRecipient: "STRING_VALUE",
77
77
  * // telephony: true || false,
78
78
  * // external: true || false,
79
+ * // pinnedMessageIds: [ // PinnedMessageIdList
80
+ * // "STRING_VALUE",
81
+ * // ],
79
82
  * // subject: "STRING_VALUE",
80
83
  * // description: "STRING_VALUE",
81
84
  * // picture: "STRING_VALUE",
@@ -78,6 +78,9 @@ declare const SearchChannelsCommand_base: {
78
78
  * // serviceRecipient: "STRING_VALUE",
79
79
  * // telephony: true || false,
80
80
  * // external: true || false,
81
+ * // pinnedMessageIds: [ // PinnedMessageIdList
82
+ * // "STRING_VALUE",
83
+ * // ],
81
84
  * // subject: "STRING_VALUE",
82
85
  * // description: "STRING_VALUE",
83
86
  * // picture: "STRING_VALUE",
@@ -111,6 +111,9 @@ declare const UpdateChannelCommand_base: {
111
111
  * // serviceRecipient: "STRING_VALUE",
112
112
  * // telephony: true || false,
113
113
  * // external: true || false,
114
+ * // pinnedMessageIds: [ // PinnedMessageIdList
115
+ * // "STRING_VALUE",
116
+ * // ],
114
117
  * // subject: "STRING_VALUE",
115
118
  * // description: "STRING_VALUE",
116
119
  * // picture: "STRING_VALUE",
@@ -442,6 +442,11 @@ export interface Channel {
442
442
  serviceRecipient?: string | undefined;
443
443
  telephony?: boolean | undefined;
444
444
  external?: boolean | undefined;
445
+ /**
446
+ * Message ids currently pinned at channel scope, newest pin first. Empty when nothing is pinned.
447
+ * @public
448
+ */
449
+ pinnedMessageIds?: string[] | undefined;
445
450
  /**
446
451
  * The subject of the channel.
447
452
  * @public
@@ -1610,6 +1615,11 @@ export interface InboxChannel {
1610
1615
  serviceRecipient?: string | undefined;
1611
1616
  telephony?: boolean | undefined;
1612
1617
  external?: boolean | undefined;
1618
+ /**
1619
+ * Message ids currently pinned at channel scope, newest pin first. Empty when nothing is pinned.
1620
+ * @public
1621
+ */
1622
+ pinnedMessageIds?: string[] | undefined;
1613
1623
  /**
1614
1624
  * The subject of the channel.
1615
1625
  * @public
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/stream-client",
3
3
  "description": "@wildix/stream-client client",
4
- "version": "4.0.2",
4
+ "version": "4.0.4",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",