@ogcio/building-blocks-sdk 0.2.98 → 0.2.99

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 (35) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +7 -0
  3. package/dist/client/clients/messaging-public-api/citizen/index.d.ts +602 -0
  4. package/dist/client/clients/messaging-public-api/citizen/index.d.ts.map +1 -0
  5. package/dist/client/clients/messaging-public-api/citizen/index.js +34 -0
  6. package/dist/client/clients/messaging-public-api/citizen/index.js.map +1 -0
  7. package/dist/client/clients/messaging-public-api/index.d.ts +18 -0
  8. package/dist/client/clients/messaging-public-api/index.d.ts.map +1 -0
  9. package/dist/client/clients/messaging-public-api/index.js +15 -0
  10. package/dist/client/clients/messaging-public-api/index.js.map +1 -0
  11. package/dist/client/clients/messaging-public-api/organisation/index.d.ts +621 -0
  12. package/dist/client/clients/messaging-public-api/organisation/index.d.ts.map +1 -0
  13. package/dist/client/clients/messaging-public-api/organisation/index.js +49 -0
  14. package/dist/client/clients/messaging-public-api/organisation/index.js.map +1 -0
  15. package/dist/client/clients/messaging-public-api/schema.d.ts +2464 -0
  16. package/dist/client/clients/messaging-public-api/schema.d.ts.map +1 -0
  17. package/dist/client/clients/messaging-public-api/schema.js +2 -0
  18. package/dist/client/clients/messaging-public-api/schema.js.map +1 -0
  19. package/dist/clients-configurations/clients-configuration.json +17 -1
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +2 -0
  22. package/dist/index.js.map +1 -1
  23. package/dist/types/index.d.ts +9 -3
  24. package/dist/types/index.d.ts.map +1 -1
  25. package/dist/types/index.js +2 -1
  26. package/dist/types/index.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/client/clients/messaging-public-api/citizen/index.ts +57 -0
  29. package/src/client/clients/messaging-public-api/index.ts +35 -0
  30. package/src/client/clients/messaging-public-api/open-api-definition.json +4539 -0
  31. package/src/client/clients/messaging-public-api/organisation/index.ts +79 -0
  32. package/src/client/clients/messaging-public-api/schema.ts +2463 -0
  33. package/src/clients-configurations/clients-configuration.json +17 -1
  34. package/src/index.ts +7 -0
  35. package/src/types/index.ts +9 -0
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.2.98"
2
+ ".": "0.2.99"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.99](https://github.com/ogcio/building-blocks-sdk/compare/@ogcio/building-blocks-sdk@v0.2.98...@ogcio/building-blocks-sdk@v0.2.99) (2026-06-23)
4
+
5
+
6
+ ### Features
7
+
8
+ * add messagingPublicApi client AB[#39684](https://github.com/ogcio/building-blocks-sdk/issues/39684) ([#388](https://github.com/ogcio/building-blocks-sdk/issues/388)) ([7d64b09](https://github.com/ogcio/building-blocks-sdk/commit/7d64b0984ff949e822c070831be697c959968bf3))
9
+
3
10
  ## [0.2.98](https://github.com/ogcio/building-blocks-sdk/compare/@ogcio/building-blocks-sdk@v0.2.97...@ogcio/building-blocks-sdk@v0.2.98) (2026-06-22)
4
11
 
5
12
 
@@ -0,0 +1,602 @@
1
+ import type createClient from "openapi-fetch";
2
+ import type { Logger } from "../../../../types/index.js";
3
+ import type { paths } from "../schema.js";
4
+ export declare class MessagingPublicApiCitizen {
5
+ private readonly client;
6
+ private readonly serviceName;
7
+ private readonly logger;
8
+ constructor(client: ReturnType<typeof createClient<paths>>, serviceName: string, logger: Logger | undefined);
9
+ getMessage(messageId: paths["/api/v1/citizens/messages/{messageId}"]["get"]["parameters"]["path"]["messageId"], query?: paths["/api/v1/citizens/messages/{messageId}"]["get"]["parameters"]["query"]): Promise<import("../../../utils/client-utils.js").DataResponseValue<{
10
+ parameters: {
11
+ query?: {
12
+ includeMetadata?: "true" | "false" | "1" | "0";
13
+ };
14
+ header?: never;
15
+ path: {
16
+ messageId: string;
17
+ };
18
+ cookie?: never;
19
+ };
20
+ requestBody?: never;
21
+ responses: {
22
+ 200: {
23
+ headers: {
24
+ [name: string]: unknown;
25
+ };
26
+ content: {
27
+ "application/json": {
28
+ data: {
29
+ subject: string;
30
+ createdAt: string;
31
+ threadName: string | null;
32
+ organisationId: string;
33
+ recipientUserId: string;
34
+ excerpt: string | null;
35
+ plainText: string;
36
+ richText: string | null;
37
+ isSeen: boolean;
38
+ security: "public" | "confidential";
39
+ attachments: string[];
40
+ externalId: string | null;
41
+ metadata?: {
42
+ journey?: {
43
+ journeyId?: string;
44
+ submissionId: string;
45
+ };
46
+ } | null;
47
+ };
48
+ metadata?: {
49
+ links?: {
50
+ self: {
51
+ href?: string;
52
+ };
53
+ next?: {
54
+ href?: string;
55
+ };
56
+ prev?: {
57
+ href?: string;
58
+ };
59
+ first: {
60
+ href?: string;
61
+ };
62
+ last: {
63
+ href?: string;
64
+ };
65
+ pages: {
66
+ [key: string]: {
67
+ href?: string;
68
+ };
69
+ };
70
+ };
71
+ totalCount?: number;
72
+ };
73
+ };
74
+ };
75
+ };
76
+ 400: {
77
+ headers: {
78
+ [name: string]: unknown;
79
+ };
80
+ content: {
81
+ "application/json": {
82
+ code: string;
83
+ detail: string;
84
+ requestId: string;
85
+ name: string;
86
+ validation?: {
87
+ fieldName: string;
88
+ message: string;
89
+ }[];
90
+ validationContext?: string;
91
+ statusCode: number;
92
+ };
93
+ };
94
+ };
95
+ 401: {
96
+ headers: {
97
+ [name: string]: unknown;
98
+ };
99
+ content: {
100
+ "application/json": {
101
+ code: string;
102
+ detail: string;
103
+ requestId: string;
104
+ name: string;
105
+ validation?: {
106
+ fieldName: string;
107
+ message: string;
108
+ }[];
109
+ validationContext?: string;
110
+ statusCode: number;
111
+ };
112
+ };
113
+ };
114
+ 403: {
115
+ headers: {
116
+ [name: string]: unknown;
117
+ };
118
+ content: {
119
+ "application/json": {
120
+ code: string;
121
+ detail: string;
122
+ requestId: string;
123
+ name: string;
124
+ validation?: {
125
+ fieldName: string;
126
+ message: string;
127
+ }[];
128
+ validationContext?: string;
129
+ statusCode: number;
130
+ };
131
+ };
132
+ };
133
+ 404: {
134
+ headers: {
135
+ [name: string]: unknown;
136
+ };
137
+ content: {
138
+ "application/json": {
139
+ code: string;
140
+ detail: string;
141
+ requestId: string;
142
+ name: string;
143
+ validation?: {
144
+ fieldName: string;
145
+ message: string;
146
+ }[];
147
+ validationContext?: string;
148
+ statusCode: number;
149
+ };
150
+ };
151
+ };
152
+ 422: {
153
+ headers: {
154
+ [name: string]: unknown;
155
+ };
156
+ content: {
157
+ "application/json": {
158
+ code: string;
159
+ detail: string;
160
+ requestId: string;
161
+ name: string;
162
+ validation?: {
163
+ fieldName: string;
164
+ message: string;
165
+ }[];
166
+ validationContext?: string;
167
+ statusCode: number;
168
+ };
169
+ };
170
+ };
171
+ 500: {
172
+ headers: {
173
+ [name: string]: unknown;
174
+ };
175
+ content: {
176
+ "application/json": {
177
+ code: string;
178
+ detail: string;
179
+ requestId: string;
180
+ name: string;
181
+ validation?: {
182
+ fieldName: string;
183
+ message: string;
184
+ }[];
185
+ validationContext?: string;
186
+ statusCode: number;
187
+ };
188
+ };
189
+ };
190
+ 502: {
191
+ headers: {
192
+ [name: string]: unknown;
193
+ };
194
+ content: {
195
+ "application/json": {
196
+ code: string;
197
+ detail: string;
198
+ requestId: string;
199
+ name: string;
200
+ validation?: {
201
+ fieldName: string;
202
+ message: string;
203
+ }[];
204
+ validationContext?: string;
205
+ statusCode: number;
206
+ };
207
+ };
208
+ };
209
+ };
210
+ }, {
211
+ params: {
212
+ path: {
213
+ messageId: string;
214
+ };
215
+ query: {
216
+ includeMetadata?: "true" | "false" | "1" | "0";
217
+ } | undefined;
218
+ };
219
+ }>>;
220
+ getMessages(query?: paths["/api/v1/citizens/messages/"]["get"]["parameters"]["query"]): Promise<import("../../../utils/client-utils.js").DataResponseValue<{
221
+ parameters: {
222
+ query?: {
223
+ offset?: string;
224
+ limit?: string;
225
+ search?: string;
226
+ submissionId?: string;
227
+ isSeen?: "true" | "false" | "1" | "0";
228
+ deletedAfterDateTime?: string;
229
+ includeMetadata?: "true" | "false" | "1" | "0";
230
+ };
231
+ header?: never;
232
+ path?: never;
233
+ cookie?: never;
234
+ };
235
+ requestBody?: never;
236
+ responses: {
237
+ 200: {
238
+ headers: {
239
+ [name: string]: unknown;
240
+ };
241
+ content: {
242
+ "application/json": {
243
+ data: {
244
+ id: string;
245
+ subject: string;
246
+ createdAt: string;
247
+ threadName: string | null;
248
+ organisationId: string;
249
+ recipientUserId: string;
250
+ attachmentsCount: number;
251
+ metadata?: {
252
+ journey?: {
253
+ journeyId?: string;
254
+ submissionId: string;
255
+ };
256
+ } | null;
257
+ }[];
258
+ metadata?: {
259
+ links?: {
260
+ self: {
261
+ href?: string;
262
+ };
263
+ next?: {
264
+ href?: string;
265
+ };
266
+ prev?: {
267
+ href?: string;
268
+ };
269
+ first: {
270
+ href?: string;
271
+ };
272
+ last: {
273
+ href?: string;
274
+ };
275
+ pages: {
276
+ [key: string]: {
277
+ href?: string;
278
+ };
279
+ };
280
+ };
281
+ totalCount?: number;
282
+ };
283
+ };
284
+ };
285
+ };
286
+ 400: {
287
+ headers: {
288
+ [name: string]: unknown;
289
+ };
290
+ content: {
291
+ "application/json": {
292
+ code: string;
293
+ detail: string;
294
+ requestId: string;
295
+ name: string;
296
+ validation?: {
297
+ fieldName: string;
298
+ message: string;
299
+ }[];
300
+ validationContext?: string;
301
+ statusCode: number;
302
+ };
303
+ };
304
+ };
305
+ 401: {
306
+ headers: {
307
+ [name: string]: unknown;
308
+ };
309
+ content: {
310
+ "application/json": {
311
+ code: string;
312
+ detail: string;
313
+ requestId: string;
314
+ name: string;
315
+ validation?: {
316
+ fieldName: string;
317
+ message: string;
318
+ }[];
319
+ validationContext?: string;
320
+ statusCode: number;
321
+ };
322
+ };
323
+ };
324
+ 403: {
325
+ headers: {
326
+ [name: string]: unknown;
327
+ };
328
+ content: {
329
+ "application/json": {
330
+ code: string;
331
+ detail: string;
332
+ requestId: string;
333
+ name: string;
334
+ validation?: {
335
+ fieldName: string;
336
+ message: string;
337
+ }[];
338
+ validationContext?: string;
339
+ statusCode: number;
340
+ };
341
+ };
342
+ };
343
+ 422: {
344
+ headers: {
345
+ [name: string]: unknown;
346
+ };
347
+ content: {
348
+ "application/json": {
349
+ code: string;
350
+ detail: string;
351
+ requestId: string;
352
+ name: string;
353
+ validation?: {
354
+ fieldName: string;
355
+ message: string;
356
+ }[];
357
+ validationContext?: string;
358
+ statusCode: number;
359
+ };
360
+ };
361
+ };
362
+ 500: {
363
+ headers: {
364
+ [name: string]: unknown;
365
+ };
366
+ content: {
367
+ "application/json": {
368
+ code: string;
369
+ detail: string;
370
+ requestId: string;
371
+ name: string;
372
+ validation?: {
373
+ fieldName: string;
374
+ message: string;
375
+ }[];
376
+ validationContext?: string;
377
+ statusCode: number;
378
+ };
379
+ };
380
+ };
381
+ 502: {
382
+ headers: {
383
+ [name: string]: unknown;
384
+ };
385
+ content: {
386
+ "application/json": {
387
+ code: string;
388
+ detail: string;
389
+ requestId: string;
390
+ name: string;
391
+ validation?: {
392
+ fieldName: string;
393
+ message: string;
394
+ }[];
395
+ validationContext?: string;
396
+ statusCode: number;
397
+ };
398
+ };
399
+ };
400
+ };
401
+ }, {
402
+ params: {
403
+ query: {
404
+ offset?: string;
405
+ limit?: string;
406
+ search?: string;
407
+ submissionId?: string;
408
+ isSeen?: "true" | "false" | "1" | "0";
409
+ deletedAfterDateTime?: string;
410
+ includeMetadata?: "true" | "false" | "1" | "0";
411
+ } | undefined;
412
+ };
413
+ }>>;
414
+ submitConsent(body: paths["/api/v1/citizens/messages/consent"]["post"]["requestBody"]["content"]["application/json"]): Promise<({
415
+ data: {
416
+ profileId: string;
417
+ metadata: {
418
+ journey?: {
419
+ journeyId?: string;
420
+ submissionId: string;
421
+ };
422
+ };
423
+ submittedAt: string;
424
+ };
425
+ metadata?: {
426
+ links?: {
427
+ self: {
428
+ href?: string;
429
+ };
430
+ next?: {
431
+ href?: string;
432
+ };
433
+ prev?: {
434
+ href?: string;
435
+ };
436
+ first: {
437
+ href?: string;
438
+ };
439
+ last: {
440
+ href?: string;
441
+ };
442
+ pages: {
443
+ [key: string]: {
444
+ href?: string;
445
+ };
446
+ };
447
+ };
448
+ totalCount?: number;
449
+ };
450
+ } & {
451
+ error: {
452
+ code: string;
453
+ detail: string;
454
+ requestId: string;
455
+ name: string;
456
+ validation?: {
457
+ fieldName: string;
458
+ message: string;
459
+ }[];
460
+ validationContext?: string;
461
+ statusCode: number;
462
+ } | {
463
+ code: string;
464
+ detail: string;
465
+ requestId: string;
466
+ name: string;
467
+ validation?: {
468
+ fieldName: string;
469
+ message: string;
470
+ }[];
471
+ validationContext?: string;
472
+ statusCode: number;
473
+ } | {
474
+ code: string;
475
+ detail: string;
476
+ requestId: string;
477
+ name: string;
478
+ validation?: {
479
+ fieldName: string;
480
+ message: string;
481
+ }[];
482
+ validationContext?: string;
483
+ statusCode: number;
484
+ } | {
485
+ code: string;
486
+ detail: string;
487
+ requestId: string;
488
+ name: string;
489
+ validation?: {
490
+ fieldName: string;
491
+ message: string;
492
+ }[];
493
+ validationContext?: string;
494
+ statusCode: number;
495
+ } | {
496
+ code: string;
497
+ detail: string;
498
+ requestId: string;
499
+ name: string;
500
+ validation?: {
501
+ fieldName: string;
502
+ message: string;
503
+ }[];
504
+ validationContext?: string;
505
+ statusCode: number;
506
+ };
507
+ }) | ({
508
+ data: {
509
+ profileId: string;
510
+ metadata: {
511
+ journey?: {
512
+ journeyId?: string;
513
+ submissionId: string;
514
+ };
515
+ };
516
+ submittedAt: string;
517
+ };
518
+ metadata?: {
519
+ links?: {
520
+ self: {
521
+ href?: string;
522
+ };
523
+ next?: {
524
+ href?: string;
525
+ };
526
+ prev?: {
527
+ href?: string;
528
+ };
529
+ first: {
530
+ href?: string;
531
+ };
532
+ last: {
533
+ href?: string;
534
+ };
535
+ pages: {
536
+ [key: string]: {
537
+ href?: string;
538
+ };
539
+ };
540
+ };
541
+ totalCount?: number;
542
+ };
543
+ } & {
544
+ error: {
545
+ code: string;
546
+ detail: string;
547
+ requestId: string;
548
+ name: string;
549
+ validation?: {
550
+ fieldName: string;
551
+ message: string;
552
+ }[];
553
+ validationContext?: string;
554
+ statusCode: number;
555
+ } | {
556
+ code: string;
557
+ detail: string;
558
+ requestId: string;
559
+ name: string;
560
+ validation?: {
561
+ fieldName: string;
562
+ message: string;
563
+ }[];
564
+ validationContext?: string;
565
+ statusCode: number;
566
+ } | {
567
+ code: string;
568
+ detail: string;
569
+ requestId: string;
570
+ name: string;
571
+ validation?: {
572
+ fieldName: string;
573
+ message: string;
574
+ }[];
575
+ validationContext?: string;
576
+ statusCode: number;
577
+ } | {
578
+ code: string;
579
+ detail: string;
580
+ requestId: string;
581
+ name: string;
582
+ validation?: {
583
+ fieldName: string;
584
+ message: string;
585
+ }[];
586
+ validationContext?: string;
587
+ statusCode: number;
588
+ } | {
589
+ code: string;
590
+ detail: string;
591
+ requestId: string;
592
+ name: string;
593
+ validation?: {
594
+ fieldName: string;
595
+ message: string;
596
+ }[];
597
+ validationContext?: string;
598
+ statusCode: number;
599
+ };
600
+ })>;
601
+ }
602
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/client/clients/messaging-public-api/citizen/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAMzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,qBAAa,yBAAyB;IAElC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAFN,MAAM,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,EAC9C,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GAAG,SAAS;IAGvC,UAAU,CAC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0,0 +1,34 @@
1
+ import { formatError, formatResponse, throwIfEmpty, } from "../../../utils/client-utils.js";
2
+ export class MessagingPublicApiCitizen {
3
+ client;
4
+ serviceName;
5
+ logger;
6
+ constructor(client, serviceName, logger) {
7
+ this.client = client;
8
+ this.serviceName = serviceName;
9
+ this.logger = logger;
10
+ }
11
+ async getMessage(messageId, query) {
12
+ throwIfEmpty(messageId);
13
+ return this.client
14
+ .GET("/api/v1/citizens/messages/{messageId}", {
15
+ params: { path: { messageId }, query },
16
+ })
17
+ .then((response) => formatResponse(response, this.serviceName, this.logger), (reason) => formatError(reason, this.serviceName, this.logger));
18
+ }
19
+ async getMessages(query) {
20
+ return this.client
21
+ .GET("/api/v1/citizens/messages/", {
22
+ params: { query },
23
+ })
24
+ .then((response) => formatResponse(response, this.serviceName, this.logger), (reason) => formatError(reason, this.serviceName, this.logger));
25
+ }
26
+ async submitConsent(body) {
27
+ return this.client
28
+ .POST("/api/v1/citizens/messages/consent", {
29
+ body,
30
+ })
31
+ .then((response) => formatResponse(response, this.serviceName, this.logger), (reason) => formatError(reason, this.serviceName, this.logger));
32
+ }
33
+ }
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/client/clients/messaging-public-api/citizen/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,cAAc,EACd,YAAY,GACb,MAAM,gCAAgC,CAAC;AAGxC,MAAM,OAAO,yBAAyB;IAEjB;IACA;IACA;IAHnB,YACmB,MAA8C,EAC9C,WAAmB,EACnB,MAA0B;QAF1B,WAAM,GAAN,MAAM,CAAwC;QAC9C,gBAAW,GAAX,WAAW,CAAQ;QACnB,WAAM,GAAN,MAAM,CAAoB;IAC1C,CAAC;IAEJ,KAAK,CAAC,UAAU,CACd,SAAmG,EACnG,KAAoF;QAEpF,YAAY,CAAC,SAAS,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC,MAAM;aACf,GAAG,CAAC,uCAAuC,EAAE;YAC5C,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE;SACvC,CAAC;aACD,IAAI,CACH,CAAC,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,EACrE,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,CAC/D,CAAC;IACN,CAAC;IAED,KAAK,CAAC,WAAW,CACf,KAAyE;QAEzE,OAAO,IAAI,CAAC,MAAM;aACf,GAAG,CAAC,4BAA4B,EAAE;YACjC,MAAM,EAAE,EAAE,KAAK,EAAE;SAClB,CAAC;aACD,IAAI,CACH,CAAC,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,EACrE,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,CAC/D,CAAC;IACN,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,IAAsG;QAEtG,OAAO,IAAI,CAAC,MAAM;aACf,IAAI,CAAC,mCAAmC,EAAE;YACzC,IAAI;SACL,CAAC;aACD,IAAI,CACH,CAAC,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,EACrE,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,CAC/D,CAAC;IACN,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ import type createClient from "openapi-fetch";
2
+ import { type Logger, type TokenFunction } from "../../../types/index.js";
3
+ import { BaseClient } from "../../base-client.js";
4
+ import { MessagingPublicApiCitizen } from "./citizen/index.js";
5
+ import { MessagingPublicApiOrganisation } from "./organisation/index.js";
6
+ import type { paths } from "./schema.js";
7
+ export declare class MessagingPublicApi extends BaseClient<paths> {
8
+ protected client: ReturnType<typeof createClient<paths>>;
9
+ protected serviceName: "messagingPublicApi";
10
+ readonly citizen: MessagingPublicApiCitizen;
11
+ readonly organisation: MessagingPublicApiOrganisation;
12
+ constructor(params: {
13
+ baseUrl: string;
14
+ getTokenFn?: TokenFunction;
15
+ logger?: Logger;
16
+ });
17
+ }
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/clients/messaging-public-api/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,EACL,KAAK,MAAM,EAEX,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,qBAAa,kBAAmB,SAAQ,UAAU,CAAC,KAAK,CAAC;IACvD,UAAkB,MAAM,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IACjE,SAAS,CAAC,WAAW,uBAAwB;IAC7C,SAAgB,OAAO,EAAE,yBAAyB,CAAC;IACnD,SAAgB,YAAY,EAAE,8BAA8B,CAAC;gBAEjD,MAAM,EAAE;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,aAAa,CAAC;QAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB;CAaF"}