@comms-id/company 0.2.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.
@@ -0,0 +1,674 @@
1
+ // Generated by @comms-id/forge-transformers from the service's OpenAPI contract. Do not edit: change the contract and regenerate.
2
+ /** The operations of Comms.ID Company, with the schemas the client checks. */
3
+ export const operations = {
4
+ lookup: {
5
+ name: "lookup",
6
+ method: "POST",
7
+ path: "/company/v1/lookup",
8
+ safeToRetry: true,
9
+ request: {
10
+ "t": "obj",
11
+ "props": {
12
+ "acn": {
13
+ "t": "str",
14
+ "pattern": "^[0-9]{9}$"
15
+ }
16
+ },
17
+ "req": [
18
+ "acn"
19
+ ],
20
+ "extra": false
21
+ },
22
+ response: {
23
+ "t": "obj",
24
+ "props": {
25
+ "activatedAt": {
26
+ "t": "any_of",
27
+ "of": [
28
+ {
29
+ "t": "str"
30
+ },
31
+ {
32
+ "t": "null"
33
+ }
34
+ ]
35
+ },
36
+ "attribution": {
37
+ "t": "str"
38
+ },
39
+ "generation": {
40
+ "t": "str"
41
+ },
42
+ "license": {
43
+ "t": "str"
44
+ },
45
+ "limit": {
46
+ "t": "int",
47
+ "min": 1,
48
+ "max": 10
49
+ },
50
+ "mode": {
51
+ "t": "str",
52
+ "values": [
53
+ "snapshot"
54
+ ]
55
+ },
56
+ "offset": {
57
+ "t": "num",
58
+ "values": [
59
+ 0
60
+ ]
61
+ },
62
+ "records": {
63
+ "t": "arr",
64
+ "of": {
65
+ "t": "obj",
66
+ "props": {
67
+ "register": {
68
+ "t": "str",
69
+ "values": [
70
+ "companies"
71
+ ]
72
+ },
73
+ "acn": {
74
+ "t": "any_of",
75
+ "of": [
76
+ {
77
+ "t": "str"
78
+ },
79
+ {
80
+ "t": "null"
81
+ }
82
+ ]
83
+ },
84
+ "name": {
85
+ "t": "any_of",
86
+ "of": [
87
+ {
88
+ "t": "str"
89
+ },
90
+ {
91
+ "t": "null"
92
+ }
93
+ ]
94
+ },
95
+ "status": {
96
+ "t": "any_of",
97
+ "of": [
98
+ {
99
+ "t": "str"
100
+ },
101
+ {
102
+ "t": "null"
103
+ }
104
+ ]
105
+ },
106
+ "abn": {
107
+ "t": "any_of",
108
+ "of": [
109
+ {
110
+ "t": "str"
111
+ },
112
+ {
113
+ "t": "null"
114
+ }
115
+ ]
116
+ },
117
+ "type": {
118
+ "t": "any_of",
119
+ "of": [
120
+ {
121
+ "t": "str"
122
+ },
123
+ {
124
+ "t": "null"
125
+ }
126
+ ]
127
+ },
128
+ "companyClass": {
129
+ "t": "any_of",
130
+ "of": [
131
+ {
132
+ "t": "str"
133
+ },
134
+ {
135
+ "t": "null"
136
+ }
137
+ ]
138
+ },
139
+ "subClass": {
140
+ "t": "any_of",
141
+ "of": [
142
+ {
143
+ "t": "str"
144
+ },
145
+ {
146
+ "t": "null"
147
+ }
148
+ ]
149
+ },
150
+ "registeredAt": {
151
+ "t": "any_of",
152
+ "of": [
153
+ {
154
+ "t": "str"
155
+ },
156
+ {
157
+ "t": "null"
158
+ }
159
+ ]
160
+ },
161
+ "deregisteredAt": {
162
+ "t": "any_of",
163
+ "of": [
164
+ {
165
+ "t": "str"
166
+ },
167
+ {
168
+ "t": "null"
169
+ }
170
+ ]
171
+ },
172
+ "previousState": {
173
+ "t": "any_of",
174
+ "of": [
175
+ {
176
+ "t": "str"
177
+ },
178
+ {
179
+ "t": "null"
180
+ }
181
+ ]
182
+ },
183
+ "stateRegistrationNumber": {
184
+ "t": "any_of",
185
+ "of": [
186
+ {
187
+ "t": "str"
188
+ },
189
+ {
190
+ "t": "null"
191
+ }
192
+ ]
193
+ },
194
+ "currentName": {
195
+ "t": "any_of",
196
+ "of": [
197
+ {
198
+ "t": "str"
199
+ },
200
+ {
201
+ "t": "null"
202
+ }
203
+ ]
204
+ },
205
+ "currentNameIndicator": {
206
+ "t": "any_of",
207
+ "of": [
208
+ {
209
+ "t": "str"
210
+ },
211
+ {
212
+ "t": "null"
213
+ }
214
+ ]
215
+ },
216
+ "currentNameStartedAt": {
217
+ "t": "any_of",
218
+ "of": [
219
+ {
220
+ "t": "str"
221
+ },
222
+ {
223
+ "t": "null"
224
+ }
225
+ ]
226
+ }
227
+ },
228
+ "req": [
229
+ "register",
230
+ "acn",
231
+ "name",
232
+ "status",
233
+ "abn",
234
+ "type",
235
+ "companyClass",
236
+ "subClass",
237
+ "registeredAt",
238
+ "deregisteredAt",
239
+ "previousState",
240
+ "stateRegistrationNumber",
241
+ "currentName",
242
+ "currentNameIndicator",
243
+ "currentNameStartedAt"
244
+ ],
245
+ "extra": false
246
+ },
247
+ "max": 10
248
+ },
249
+ "register": {
250
+ "t": "str",
251
+ "values": [
252
+ "companies"
253
+ ]
254
+ },
255
+ "source": {
256
+ "t": "obj",
257
+ "props": {
258
+ "datasetId": {
259
+ "t": "str",
260
+ "min": 1
261
+ },
262
+ "resourceId": {
263
+ "t": "str",
264
+ "min": 1
265
+ },
266
+ "url": {
267
+ "t": "str",
268
+ "min": 1
269
+ },
270
+ "modifiedAt": {
271
+ "t": "any_of",
272
+ "of": [
273
+ {
274
+ "t": "str"
275
+ },
276
+ {
277
+ "t": "null"
278
+ }
279
+ ]
280
+ },
281
+ "sha256": {
282
+ "t": "str"
283
+ },
284
+ "bytes": {
285
+ "t": "int"
286
+ },
287
+ "format": {
288
+ "t": "str",
289
+ "values": [
290
+ "CSV",
291
+ "ZIP",
292
+ "XLSX"
293
+ ]
294
+ },
295
+ "observedAt": {
296
+ "t": "str"
297
+ },
298
+ "license": {
299
+ "t": "str"
300
+ }
301
+ },
302
+ "req": [
303
+ "datasetId",
304
+ "resourceId",
305
+ "url",
306
+ "modifiedAt",
307
+ "sha256",
308
+ "bytes",
309
+ "format",
310
+ "observedAt",
311
+ "license"
312
+ ],
313
+ "extra": false
314
+ }
315
+ },
316
+ "req": [
317
+ "activatedAt",
318
+ "attribution",
319
+ "generation",
320
+ "license",
321
+ "limit",
322
+ "mode",
323
+ "offset",
324
+ "records",
325
+ "register",
326
+ "source"
327
+ ],
328
+ "extra": false
329
+ },
330
+ },
331
+ search: {
332
+ name: "search",
333
+ method: "POST",
334
+ path: "/company/v1/search",
335
+ safeToRetry: true,
336
+ request: {
337
+ "t": "obj",
338
+ "props": {
339
+ "namePrefix": {
340
+ "t": "str",
341
+ "max": 256,
342
+ "pattern": "\\S"
343
+ },
344
+ "status": {
345
+ "t": "str",
346
+ "max": 256,
347
+ "pattern": "\\S"
348
+ },
349
+ "limit": {
350
+ "t": "int",
351
+ "min": 1,
352
+ "max": 10
353
+ }
354
+ },
355
+ "req": [
356
+ "namePrefix"
357
+ ],
358
+ "extra": false
359
+ },
360
+ response: {
361
+ "t": "obj",
362
+ "props": {
363
+ "activatedAt": {
364
+ "t": "any_of",
365
+ "of": [
366
+ {
367
+ "t": "str"
368
+ },
369
+ {
370
+ "t": "null"
371
+ }
372
+ ]
373
+ },
374
+ "attribution": {
375
+ "t": "str"
376
+ },
377
+ "generation": {
378
+ "t": "str"
379
+ },
380
+ "license": {
381
+ "t": "str"
382
+ },
383
+ "limit": {
384
+ "t": "int",
385
+ "min": 1,
386
+ "max": 10
387
+ },
388
+ "mode": {
389
+ "t": "str",
390
+ "values": [
391
+ "snapshot"
392
+ ]
393
+ },
394
+ "offset": {
395
+ "t": "num",
396
+ "values": [
397
+ 0
398
+ ]
399
+ },
400
+ "records": {
401
+ "t": "arr",
402
+ "of": {
403
+ "t": "obj",
404
+ "props": {
405
+ "register": {
406
+ "t": "str",
407
+ "values": [
408
+ "companies"
409
+ ]
410
+ },
411
+ "acn": {
412
+ "t": "any_of",
413
+ "of": [
414
+ {
415
+ "t": "str"
416
+ },
417
+ {
418
+ "t": "null"
419
+ }
420
+ ]
421
+ },
422
+ "name": {
423
+ "t": "any_of",
424
+ "of": [
425
+ {
426
+ "t": "str"
427
+ },
428
+ {
429
+ "t": "null"
430
+ }
431
+ ]
432
+ },
433
+ "status": {
434
+ "t": "any_of",
435
+ "of": [
436
+ {
437
+ "t": "str"
438
+ },
439
+ {
440
+ "t": "null"
441
+ }
442
+ ]
443
+ },
444
+ "abn": {
445
+ "t": "any_of",
446
+ "of": [
447
+ {
448
+ "t": "str"
449
+ },
450
+ {
451
+ "t": "null"
452
+ }
453
+ ]
454
+ },
455
+ "type": {
456
+ "t": "any_of",
457
+ "of": [
458
+ {
459
+ "t": "str"
460
+ },
461
+ {
462
+ "t": "null"
463
+ }
464
+ ]
465
+ },
466
+ "companyClass": {
467
+ "t": "any_of",
468
+ "of": [
469
+ {
470
+ "t": "str"
471
+ },
472
+ {
473
+ "t": "null"
474
+ }
475
+ ]
476
+ },
477
+ "subClass": {
478
+ "t": "any_of",
479
+ "of": [
480
+ {
481
+ "t": "str"
482
+ },
483
+ {
484
+ "t": "null"
485
+ }
486
+ ]
487
+ },
488
+ "registeredAt": {
489
+ "t": "any_of",
490
+ "of": [
491
+ {
492
+ "t": "str"
493
+ },
494
+ {
495
+ "t": "null"
496
+ }
497
+ ]
498
+ },
499
+ "deregisteredAt": {
500
+ "t": "any_of",
501
+ "of": [
502
+ {
503
+ "t": "str"
504
+ },
505
+ {
506
+ "t": "null"
507
+ }
508
+ ]
509
+ },
510
+ "previousState": {
511
+ "t": "any_of",
512
+ "of": [
513
+ {
514
+ "t": "str"
515
+ },
516
+ {
517
+ "t": "null"
518
+ }
519
+ ]
520
+ },
521
+ "stateRegistrationNumber": {
522
+ "t": "any_of",
523
+ "of": [
524
+ {
525
+ "t": "str"
526
+ },
527
+ {
528
+ "t": "null"
529
+ }
530
+ ]
531
+ },
532
+ "currentName": {
533
+ "t": "any_of",
534
+ "of": [
535
+ {
536
+ "t": "str"
537
+ },
538
+ {
539
+ "t": "null"
540
+ }
541
+ ]
542
+ },
543
+ "currentNameIndicator": {
544
+ "t": "any_of",
545
+ "of": [
546
+ {
547
+ "t": "str"
548
+ },
549
+ {
550
+ "t": "null"
551
+ }
552
+ ]
553
+ },
554
+ "currentNameStartedAt": {
555
+ "t": "any_of",
556
+ "of": [
557
+ {
558
+ "t": "str"
559
+ },
560
+ {
561
+ "t": "null"
562
+ }
563
+ ]
564
+ }
565
+ },
566
+ "req": [
567
+ "register",
568
+ "acn",
569
+ "name",
570
+ "status",
571
+ "abn",
572
+ "type",
573
+ "companyClass",
574
+ "subClass",
575
+ "registeredAt",
576
+ "deregisteredAt",
577
+ "previousState",
578
+ "stateRegistrationNumber",
579
+ "currentName",
580
+ "currentNameIndicator",
581
+ "currentNameStartedAt"
582
+ ],
583
+ "extra": false
584
+ },
585
+ "max": 10
586
+ },
587
+ "register": {
588
+ "t": "str",
589
+ "values": [
590
+ "companies"
591
+ ]
592
+ },
593
+ "source": {
594
+ "t": "obj",
595
+ "props": {
596
+ "datasetId": {
597
+ "t": "str",
598
+ "min": 1
599
+ },
600
+ "resourceId": {
601
+ "t": "str",
602
+ "min": 1
603
+ },
604
+ "url": {
605
+ "t": "str",
606
+ "min": 1
607
+ },
608
+ "modifiedAt": {
609
+ "t": "any_of",
610
+ "of": [
611
+ {
612
+ "t": "str"
613
+ },
614
+ {
615
+ "t": "null"
616
+ }
617
+ ]
618
+ },
619
+ "sha256": {
620
+ "t": "str"
621
+ },
622
+ "bytes": {
623
+ "t": "int"
624
+ },
625
+ "format": {
626
+ "t": "str",
627
+ "values": [
628
+ "CSV",
629
+ "ZIP",
630
+ "XLSX"
631
+ ]
632
+ },
633
+ "observedAt": {
634
+ "t": "str"
635
+ },
636
+ "license": {
637
+ "t": "str"
638
+ }
639
+ },
640
+ "req": [
641
+ "datasetId",
642
+ "resourceId",
643
+ "url",
644
+ "modifiedAt",
645
+ "sha256",
646
+ "bytes",
647
+ "format",
648
+ "observedAt",
649
+ "license"
650
+ ],
651
+ "extra": false
652
+ }
653
+ },
654
+ "req": [
655
+ "activatedAt",
656
+ "attribution",
657
+ "generation",
658
+ "license",
659
+ "limit",
660
+ "mode",
661
+ "offset",
662
+ "records",
663
+ "register",
664
+ "source"
665
+ ],
666
+ "extra": false
667
+ },
668
+ },
669
+ };
670
+ /** The error codes the contract documents for each operation. */
671
+ export const errorCodes = {
672
+ lookup: ["INVALID_INPUT", "UNAUTHORIZED", "RESIDENCY_INGRESS", "NOT_FOUND", "METHOD_NOT_ALLOWED", "LIMIT_REACHED", "CANCELLED", "INTERNAL_ERROR", "UNAVAILABLE", "RESIDENCY_UNAVAILABLE"],
673
+ search: ["INVALID_INPUT", "UNAUTHORIZED", "RESIDENCY_INGRESS", "NOT_FOUND", "METHOD_NOT_ALLOWED", "LIMIT_REACHED", "CANCELLED", "INTERNAL_ERROR", "UNAVAILABLE", "RESIDENCY_UNAVAILABLE"],
674
+ };