@rlvt/loop-openapi-client 1.0.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.
package/build/api.d.ts ADDED
@@ -0,0 +1,817 @@
1
+ import { AxiosInstance, AxiosRequestConfig } from "axios";
2
+ import type { ExperienceStatus, ExperienceVersionState, LoopStatus, LoopVersionState } from "./definitions";
3
+ export * from "./definitions";
4
+ export default class {
5
+ axios: AxiosInstance;
6
+ constructor(configOrInstance: AxiosRequestConfig | AxiosInstance);
7
+ private listExperience;
8
+ private createExperience;
9
+ private getExperience;
10
+ private updateExperience;
11
+ private deleteExperience;
12
+ private publishExperience;
13
+ private listLoop;
14
+ private createLoop;
15
+ private getLoop;
16
+ private updateLoop;
17
+ private deleteLoop;
18
+ private publishLoop;
19
+ get Experience(): {
20
+ list: (params: {
21
+ ids?: string[] | undefined;
22
+ name?: string | undefined;
23
+ resourceGroupIds?: string[] | undefined;
24
+ status?: ExperienceStatus[] | undefined;
25
+ includeArchived?: boolean | undefined;
26
+ sortBy?: "createdAt" | "updatedAt" | undefined;
27
+ sortOrder?: "desc" | "asc" | undefined;
28
+ select?: string[] | undefined;
29
+ page?: number | undefined;
30
+ perPage?: number | undefined;
31
+ }, options?: AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<{
32
+ paginationCount: number;
33
+ paginationPage: number;
34
+ paginationLimit: number;
35
+ } & {
36
+ status: "success";
37
+ } & {
38
+ data: {
39
+ readonly createdAt: string & {
40
+ readonly?: "__readonly" | undefined;
41
+ };
42
+ readonly updatedAt: string & {
43
+ readonly?: "__readonly" | undefined;
44
+ };
45
+ readonly status: ExperienceStatus & {
46
+ readonly?: "__readonly" | undefined;
47
+ };
48
+ name: string;
49
+ resourceGroupIds: string[];
50
+ description?: string | undefined;
51
+ readonly id: string & {
52
+ readonly?: "__readonly" | undefined;
53
+ };
54
+ readonly companyId: string & {
55
+ readonly?: "__readonly" | undefined;
56
+ };
57
+ readonly versions: {
58
+ readonly createdAt: string & {
59
+ readonly?: "__readonly" | undefined;
60
+ };
61
+ readonly updatedAt: string & {
62
+ readonly?: "__readonly" | undefined;
63
+ };
64
+ id: string;
65
+ readonly state: ExperienceVersionState & {
66
+ readonly?: "__readonly" | undefined;
67
+ };
68
+ workflows: {
69
+ filter?: string | undefined;
70
+ id: string;
71
+ score: number;
72
+ }[];
73
+ metadata?: {
74
+ [x: string]: unknown;
75
+ } | undefined;
76
+ readonly lastSavedBy?: (string & {
77
+ readonly?: "__readonly" | undefined;
78
+ }) | undefined;
79
+ changeDescription?: string | undefined;
80
+ }[];
81
+ _id: string;
82
+ categories?: string[] | undefined;
83
+ readonly archivedAt: string & {
84
+ readonly?: "__readonly" | undefined;
85
+ };
86
+ }[];
87
+ program: string;
88
+ version: string;
89
+ datetime: string;
90
+ status: string;
91
+ code?: number | undefined;
92
+ message: string;
93
+ }, any>>;
94
+ create: (params: Record<string, never>, data: {
95
+ name: string;
96
+ resourceGroupIds: string[];
97
+ description?: string | undefined;
98
+ }, options?: AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<{
99
+ status: "success";
100
+ } & {
101
+ data: {
102
+ readonly createdAt: string & {
103
+ readonly?: "__readonly" | undefined;
104
+ };
105
+ readonly updatedAt: string & {
106
+ readonly?: "__readonly" | undefined;
107
+ };
108
+ readonly status: ExperienceStatus & {
109
+ readonly?: "__readonly" | undefined;
110
+ };
111
+ name: string;
112
+ resourceGroupIds: string[];
113
+ description?: string | undefined;
114
+ readonly id: string & {
115
+ readonly?: "__readonly" | undefined;
116
+ };
117
+ readonly companyId: string & {
118
+ readonly?: "__readonly" | undefined;
119
+ };
120
+ readonly versions: {
121
+ readonly createdAt: string & {
122
+ readonly?: "__readonly" | undefined;
123
+ };
124
+ readonly updatedAt: string & {
125
+ readonly?: "__readonly" | undefined;
126
+ };
127
+ id: string;
128
+ readonly state: ExperienceVersionState & {
129
+ readonly?: "__readonly" | undefined;
130
+ };
131
+ workflows: {
132
+ filter?: string | undefined;
133
+ id: string;
134
+ score: number;
135
+ }[];
136
+ metadata?: {
137
+ [x: string]: unknown;
138
+ } | undefined;
139
+ readonly lastSavedBy?: (string & {
140
+ readonly?: "__readonly" | undefined;
141
+ }) | undefined;
142
+ changeDescription?: string | undefined;
143
+ }[];
144
+ _id: string;
145
+ categories?: string[] | undefined;
146
+ readonly archivedAt: string & {
147
+ readonly?: "__readonly" | undefined;
148
+ };
149
+ };
150
+ program: string;
151
+ version: string;
152
+ datetime: string;
153
+ status: string;
154
+ code?: number | undefined;
155
+ message: string;
156
+ }, any>>;
157
+ get: (params: {
158
+ id: string;
159
+ versionId?: string | undefined;
160
+ versions?: ExperienceVersionState[] | undefined;
161
+ select?: string[] | undefined;
162
+ }, options?: AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<{
163
+ status: "success";
164
+ } & {
165
+ data: {
166
+ readonly createdAt: string & {
167
+ readonly?: "__readonly" | undefined;
168
+ };
169
+ readonly updatedAt: string & {
170
+ readonly?: "__readonly" | undefined;
171
+ };
172
+ readonly status: ExperienceStatus & {
173
+ readonly?: "__readonly" | undefined;
174
+ };
175
+ name: string;
176
+ resourceGroupIds: string[];
177
+ description?: string | undefined;
178
+ readonly id: string & {
179
+ readonly?: "__readonly" | undefined;
180
+ };
181
+ readonly companyId: string & {
182
+ readonly?: "__readonly" | undefined;
183
+ };
184
+ readonly versions: {
185
+ readonly createdAt: string & {
186
+ readonly?: "__readonly" | undefined;
187
+ };
188
+ readonly updatedAt: string & {
189
+ readonly?: "__readonly" | undefined;
190
+ };
191
+ id: string;
192
+ readonly state: ExperienceVersionState & {
193
+ readonly?: "__readonly" | undefined;
194
+ };
195
+ workflows: {
196
+ filter?: string | undefined;
197
+ id: string;
198
+ score: number;
199
+ }[];
200
+ metadata?: {
201
+ [x: string]: unknown;
202
+ } | undefined;
203
+ readonly lastSavedBy?: (string & {
204
+ readonly?: "__readonly" | undefined;
205
+ }) | undefined;
206
+ changeDescription?: string | undefined;
207
+ }[];
208
+ _id: string;
209
+ categories?: string[] | undefined;
210
+ readonly archivedAt: string & {
211
+ readonly?: "__readonly" | undefined;
212
+ };
213
+ };
214
+ program: string;
215
+ version: string;
216
+ datetime: string;
217
+ status: string;
218
+ code?: number | undefined;
219
+ message: string;
220
+ }, any>>;
221
+ update: (params: {
222
+ id: string;
223
+ }, data: {
224
+ resourceGroupIds?: string[] | undefined;
225
+ name?: string | undefined;
226
+ description?: string | undefined;
227
+ } & {
228
+ workflows?: {
229
+ id: string;
230
+ filter?: string | undefined;
231
+ score: number;
232
+ }[] | undefined;
233
+ metadata?: {
234
+ [key: string]: unknown;
235
+ } | undefined;
236
+ changeDescription?: string | undefined;
237
+ }, options?: AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<{
238
+ status: "success";
239
+ } & {
240
+ data: {
241
+ readonly createdAt: string & {
242
+ readonly?: "__readonly" | undefined;
243
+ };
244
+ readonly updatedAt: string & {
245
+ readonly?: "__readonly" | undefined;
246
+ };
247
+ readonly status: ExperienceStatus & {
248
+ readonly?: "__readonly" | undefined;
249
+ };
250
+ name: string;
251
+ resourceGroupIds: string[];
252
+ description?: string | undefined;
253
+ readonly id: string & {
254
+ readonly?: "__readonly" | undefined;
255
+ };
256
+ readonly companyId: string & {
257
+ readonly?: "__readonly" | undefined;
258
+ };
259
+ readonly versions: {
260
+ readonly createdAt: string & {
261
+ readonly?: "__readonly" | undefined;
262
+ };
263
+ readonly updatedAt: string & {
264
+ readonly?: "__readonly" | undefined;
265
+ };
266
+ id: string;
267
+ readonly state: ExperienceVersionState & {
268
+ readonly?: "__readonly" | undefined;
269
+ };
270
+ workflows: {
271
+ filter?: string | undefined;
272
+ id: string;
273
+ score: number;
274
+ }[];
275
+ metadata?: {
276
+ [x: string]: unknown;
277
+ } | undefined;
278
+ readonly lastSavedBy?: (string & {
279
+ readonly?: "__readonly" | undefined;
280
+ }) | undefined;
281
+ changeDescription?: string | undefined;
282
+ }[];
283
+ _id: string;
284
+ categories?: string[] | undefined;
285
+ readonly archivedAt: string & {
286
+ readonly?: "__readonly" | undefined;
287
+ };
288
+ };
289
+ program: string;
290
+ version: string;
291
+ datetime: string;
292
+ status: string;
293
+ code?: number | undefined;
294
+ message: string;
295
+ }, any>>;
296
+ delete: (params: {
297
+ id: string;
298
+ }, options?: AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<{
299
+ status: "success";
300
+ } & {
301
+ data: unknown;
302
+ program: string;
303
+ version: string;
304
+ datetime: string;
305
+ status: string;
306
+ code?: number | undefined;
307
+ message: string;
308
+ }, any>>;
309
+ publish: (params: {
310
+ id: string;
311
+ }, options?: AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<{
312
+ status: "success";
313
+ } & {
314
+ data: {
315
+ readonly createdAt: string & {
316
+ readonly?: "__readonly" | undefined;
317
+ };
318
+ readonly updatedAt: string & {
319
+ readonly?: "__readonly" | undefined;
320
+ };
321
+ readonly status: ExperienceStatus & {
322
+ readonly?: "__readonly" | undefined;
323
+ };
324
+ name: string;
325
+ resourceGroupIds: string[];
326
+ description?: string | undefined;
327
+ readonly id: string & {
328
+ readonly?: "__readonly" | undefined;
329
+ };
330
+ readonly companyId: string & {
331
+ readonly?: "__readonly" | undefined;
332
+ };
333
+ readonly versions: {
334
+ readonly createdAt: string & {
335
+ readonly?: "__readonly" | undefined;
336
+ };
337
+ readonly updatedAt: string & {
338
+ readonly?: "__readonly" | undefined;
339
+ };
340
+ id: string;
341
+ readonly state: ExperienceVersionState & {
342
+ readonly?: "__readonly" | undefined;
343
+ };
344
+ workflows: {
345
+ filter?: string | undefined;
346
+ id: string;
347
+ score: number;
348
+ }[];
349
+ metadata?: {
350
+ [x: string]: unknown;
351
+ } | undefined;
352
+ readonly lastSavedBy?: (string & {
353
+ readonly?: "__readonly" | undefined;
354
+ }) | undefined;
355
+ changeDescription?: string | undefined;
356
+ }[];
357
+ _id: string;
358
+ categories?: string[] | undefined;
359
+ readonly archivedAt: string & {
360
+ readonly?: "__readonly" | undefined;
361
+ };
362
+ };
363
+ program: string;
364
+ version: string;
365
+ datetime: string;
366
+ status: string;
367
+ code?: number | undefined;
368
+ message: string;
369
+ }, any>>;
370
+ };
371
+ get Loop(): {
372
+ list: (params: {
373
+ ids?: string[] | undefined;
374
+ name?: string | undefined;
375
+ resourceGroupIds?: string[] | undefined;
376
+ status?: LoopStatus[] | undefined;
377
+ includeArchived?: boolean | undefined;
378
+ sortBy?: "createdAt" | "updatedAt" | undefined;
379
+ sortOrder?: "desc" | "asc" | undefined;
380
+ select?: string[] | undefined;
381
+ page?: number | undefined;
382
+ perPage?: number | undefined;
383
+ }, options?: AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<{
384
+ paginationCount: number;
385
+ paginationPage: number;
386
+ paginationLimit: number;
387
+ } & {
388
+ status: "success";
389
+ } & {
390
+ data: {
391
+ readonly createdAt: string & {
392
+ readonly?: "__readonly" | undefined;
393
+ };
394
+ readonly updatedAt: string & {
395
+ readonly?: "__readonly" | undefined;
396
+ };
397
+ readonly status: LoopStatus & {
398
+ readonly?: "__readonly" | undefined;
399
+ };
400
+ name: string;
401
+ resourceGroupIds: string[];
402
+ description?: string | undefined;
403
+ readonly id: string & {
404
+ readonly?: "__readonly" | undefined;
405
+ };
406
+ readonly companyId: string & {
407
+ readonly?: "__readonly" | undefined;
408
+ };
409
+ readonly versions: {
410
+ readonly createdAt: string & {
411
+ readonly?: "__readonly" | undefined;
412
+ };
413
+ readonly updatedAt: string & {
414
+ readonly?: "__readonly" | undefined;
415
+ };
416
+ id: string;
417
+ readonly state: LoopVersionState & {
418
+ readonly?: "__readonly" | undefined;
419
+ };
420
+ metadata?: {
421
+ [x: string]: unknown;
422
+ } | undefined;
423
+ readonly lastSavedBy?: (string & {
424
+ readonly?: "__readonly" | undefined;
425
+ }) | undefined;
426
+ changeDescription?: string | undefined;
427
+ experiences: string[];
428
+ circuitBreakers?: {
429
+ level: "global" | "individual";
430
+ unit: "year" | "day" | "hour" | "minute" | "second";
431
+ value: number;
432
+ }[] | undefined;
433
+ readonly forkedFrom?: (string & {
434
+ readonly?: "__readonly" | undefined;
435
+ }) | undefined;
436
+ }[];
437
+ _id: string;
438
+ readonly archivedAt: string & {
439
+ readonly?: "__readonly" | undefined;
440
+ };
441
+ datasources: ({
442
+ id: string;
443
+ type: "contacts";
444
+ shard?: unknown;
445
+ } | {
446
+ filter?: unknown;
447
+ id: string;
448
+ type: "purchases";
449
+ } | {
450
+ id: string;
451
+ type: "push";
452
+ channel: string[];
453
+ })[];
454
+ }[];
455
+ program: string;
456
+ version: string;
457
+ datetime: string;
458
+ status: string;
459
+ code?: number | undefined;
460
+ message: string;
461
+ }, any>>;
462
+ create: (params: Record<string, never>, data: {
463
+ name: string;
464
+ resourceGroupIds: string[];
465
+ description?: string | undefined;
466
+ datasources: ({
467
+ id: string;
468
+ type: "contacts";
469
+ shard?: unknown;
470
+ } | {
471
+ filter?: unknown;
472
+ id: string;
473
+ type: "purchases";
474
+ } | {
475
+ id: string;
476
+ type: "push";
477
+ channel: string[];
478
+ })[];
479
+ }, options?: AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<{
480
+ status: "success";
481
+ } & {
482
+ data: {
483
+ readonly createdAt: string & {
484
+ readonly?: "__readonly" | undefined;
485
+ };
486
+ readonly updatedAt: string & {
487
+ readonly?: "__readonly" | undefined;
488
+ };
489
+ readonly status: LoopStatus & {
490
+ readonly?: "__readonly" | undefined;
491
+ };
492
+ name: string;
493
+ resourceGroupIds: string[];
494
+ description?: string | undefined;
495
+ readonly id: string & {
496
+ readonly?: "__readonly" | undefined;
497
+ };
498
+ readonly companyId: string & {
499
+ readonly?: "__readonly" | undefined;
500
+ };
501
+ readonly versions: {
502
+ readonly createdAt: string & {
503
+ readonly?: "__readonly" | undefined;
504
+ };
505
+ readonly updatedAt: string & {
506
+ readonly?: "__readonly" | undefined;
507
+ };
508
+ id: string;
509
+ readonly state: LoopVersionState & {
510
+ readonly?: "__readonly" | undefined;
511
+ };
512
+ metadata?: {
513
+ [x: string]: unknown;
514
+ } | undefined;
515
+ readonly lastSavedBy?: (string & {
516
+ readonly?: "__readonly" | undefined;
517
+ }) | undefined;
518
+ changeDescription?: string | undefined;
519
+ experiences: string[];
520
+ circuitBreakers?: {
521
+ level: "global" | "individual";
522
+ unit: "year" | "day" | "hour" | "minute" | "second";
523
+ value: number;
524
+ }[] | undefined;
525
+ readonly forkedFrom?: (string & {
526
+ readonly?: "__readonly" | undefined;
527
+ }) | undefined;
528
+ }[];
529
+ _id: string;
530
+ readonly archivedAt: string & {
531
+ readonly?: "__readonly" | undefined;
532
+ };
533
+ datasources: ({
534
+ id: string;
535
+ type: "contacts";
536
+ shard?: unknown;
537
+ } | {
538
+ filter?: unknown;
539
+ id: string;
540
+ type: "purchases";
541
+ } | {
542
+ id: string;
543
+ type: "push";
544
+ channel: string[];
545
+ })[];
546
+ };
547
+ program: string;
548
+ version: string;
549
+ datetime: string;
550
+ status: string;
551
+ code?: number | undefined;
552
+ message: string;
553
+ }, any>>;
554
+ get: (params: {
555
+ id: string;
556
+ versionId?: string | undefined;
557
+ versions?: LoopVersionState[] | undefined;
558
+ select?: string[] | undefined;
559
+ }, options?: AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<{
560
+ status: "success";
561
+ } & {
562
+ data: {
563
+ readonly createdAt: string & {
564
+ readonly?: "__readonly" | undefined;
565
+ };
566
+ readonly updatedAt: string & {
567
+ readonly?: "__readonly" | undefined;
568
+ };
569
+ readonly status: LoopStatus & {
570
+ readonly?: "__readonly" | undefined;
571
+ };
572
+ name: string;
573
+ resourceGroupIds: string[];
574
+ description?: string | undefined;
575
+ readonly id: string & {
576
+ readonly?: "__readonly" | undefined;
577
+ };
578
+ readonly companyId: string & {
579
+ readonly?: "__readonly" | undefined;
580
+ };
581
+ readonly versions: {
582
+ readonly createdAt: string & {
583
+ readonly?: "__readonly" | undefined;
584
+ };
585
+ readonly updatedAt: string & {
586
+ readonly?: "__readonly" | undefined;
587
+ };
588
+ id: string;
589
+ readonly state: LoopVersionState & {
590
+ readonly?: "__readonly" | undefined;
591
+ };
592
+ metadata?: {
593
+ [x: string]: unknown;
594
+ } | undefined;
595
+ readonly lastSavedBy?: (string & {
596
+ readonly?: "__readonly" | undefined;
597
+ }) | undefined;
598
+ changeDescription?: string | undefined;
599
+ experiences: string[];
600
+ circuitBreakers?: {
601
+ level: "global" | "individual";
602
+ unit: "year" | "day" | "hour" | "minute" | "second";
603
+ value: number;
604
+ }[] | undefined;
605
+ readonly forkedFrom?: (string & {
606
+ readonly?: "__readonly" | undefined;
607
+ }) | undefined;
608
+ }[];
609
+ _id: string;
610
+ readonly archivedAt: string & {
611
+ readonly?: "__readonly" | undefined;
612
+ };
613
+ datasources: ({
614
+ id: string;
615
+ type: "contacts";
616
+ shard?: unknown;
617
+ } | {
618
+ filter?: unknown;
619
+ id: string;
620
+ type: "purchases";
621
+ } | {
622
+ id: string;
623
+ type: "push";
624
+ channel: string[];
625
+ })[];
626
+ };
627
+ program: string;
628
+ version: string;
629
+ datetime: string;
630
+ status: string;
631
+ code?: number | undefined;
632
+ message: string;
633
+ }, any>>;
634
+ update: (params: {
635
+ id: string;
636
+ }, data: {
637
+ resourceGroupIds?: string[] | undefined;
638
+ name?: string | undefined;
639
+ description?: string | undefined;
640
+ } & {
641
+ experiences?: string[] | undefined;
642
+ metadata?: {
643
+ [key: string]: unknown;
644
+ } | undefined;
645
+ changeDescription?: string | undefined;
646
+ circuitBreakers?: {
647
+ level: "global" | "individual";
648
+ unit: "year" | "day" | "hour" | "minute" | "second";
649
+ value: number;
650
+ }[] | undefined;
651
+ }, options?: AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<{
652
+ status: "success";
653
+ } & {
654
+ data: {
655
+ readonly createdAt: string & {
656
+ readonly?: "__readonly" | undefined;
657
+ };
658
+ readonly updatedAt: string & {
659
+ readonly?: "__readonly" | undefined;
660
+ };
661
+ readonly status: LoopStatus & {
662
+ readonly?: "__readonly" | undefined;
663
+ };
664
+ name: string;
665
+ resourceGroupIds: string[];
666
+ description?: string | undefined;
667
+ readonly id: string & {
668
+ readonly?: "__readonly" | undefined;
669
+ };
670
+ readonly companyId: string & {
671
+ readonly?: "__readonly" | undefined;
672
+ };
673
+ readonly versions: {
674
+ readonly createdAt: string & {
675
+ readonly?: "__readonly" | undefined;
676
+ };
677
+ readonly updatedAt: string & {
678
+ readonly?: "__readonly" | undefined;
679
+ };
680
+ id: string;
681
+ readonly state: LoopVersionState & {
682
+ readonly?: "__readonly" | undefined;
683
+ };
684
+ metadata?: {
685
+ [x: string]: unknown;
686
+ } | undefined;
687
+ readonly lastSavedBy?: (string & {
688
+ readonly?: "__readonly" | undefined;
689
+ }) | undefined;
690
+ changeDescription?: string | undefined;
691
+ experiences: string[];
692
+ circuitBreakers?: {
693
+ level: "global" | "individual";
694
+ unit: "year" | "day" | "hour" | "minute" | "second";
695
+ value: number;
696
+ }[] | undefined;
697
+ readonly forkedFrom?: (string & {
698
+ readonly?: "__readonly" | undefined;
699
+ }) | undefined;
700
+ }[];
701
+ _id: string;
702
+ readonly archivedAt: string & {
703
+ readonly?: "__readonly" | undefined;
704
+ };
705
+ datasources: ({
706
+ id: string;
707
+ type: "contacts";
708
+ shard?: unknown;
709
+ } | {
710
+ filter?: unknown;
711
+ id: string;
712
+ type: "purchases";
713
+ } | {
714
+ id: string;
715
+ type: "push";
716
+ channel: string[];
717
+ })[];
718
+ };
719
+ program: string;
720
+ version: string;
721
+ datetime: string;
722
+ status: string;
723
+ code?: number | undefined;
724
+ message: string;
725
+ }, any>>;
726
+ delete: (params: {
727
+ id: string;
728
+ }, options?: AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<{
729
+ status: "success";
730
+ } & {
731
+ data: unknown;
732
+ program: string;
733
+ version: string;
734
+ datetime: string;
735
+ status: string;
736
+ code?: number | undefined;
737
+ message: string;
738
+ }, any>>;
739
+ publish: (params: {
740
+ id: string;
741
+ }, options?: AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<{
742
+ status: "success";
743
+ } & {
744
+ data: {
745
+ readonly createdAt: string & {
746
+ readonly?: "__readonly" | undefined;
747
+ };
748
+ readonly updatedAt: string & {
749
+ readonly?: "__readonly" | undefined;
750
+ };
751
+ readonly status: LoopStatus & {
752
+ readonly?: "__readonly" | undefined;
753
+ };
754
+ name: string;
755
+ resourceGroupIds: string[];
756
+ description?: string | undefined;
757
+ readonly id: string & {
758
+ readonly?: "__readonly" | undefined;
759
+ };
760
+ readonly companyId: string & {
761
+ readonly?: "__readonly" | undefined;
762
+ };
763
+ readonly versions: {
764
+ readonly createdAt: string & {
765
+ readonly?: "__readonly" | undefined;
766
+ };
767
+ readonly updatedAt: string & {
768
+ readonly?: "__readonly" | undefined;
769
+ };
770
+ id: string;
771
+ readonly state: LoopVersionState & {
772
+ readonly?: "__readonly" | undefined;
773
+ };
774
+ metadata?: {
775
+ [x: string]: unknown;
776
+ } | undefined;
777
+ readonly lastSavedBy?: (string & {
778
+ readonly?: "__readonly" | undefined;
779
+ }) | undefined;
780
+ changeDescription?: string | undefined;
781
+ experiences: string[];
782
+ circuitBreakers?: {
783
+ level: "global" | "individual";
784
+ unit: "year" | "day" | "hour" | "minute" | "second";
785
+ value: number;
786
+ }[] | undefined;
787
+ readonly forkedFrom?: (string & {
788
+ readonly?: "__readonly" | undefined;
789
+ }) | undefined;
790
+ }[];
791
+ _id: string;
792
+ readonly archivedAt: string & {
793
+ readonly?: "__readonly" | undefined;
794
+ };
795
+ datasources: ({
796
+ id: string;
797
+ type: "contacts";
798
+ shard?: unknown;
799
+ } | {
800
+ filter?: unknown;
801
+ id: string;
802
+ type: "purchases";
803
+ } | {
804
+ id: string;
805
+ type: "push";
806
+ channel: string[];
807
+ })[];
808
+ };
809
+ program: string;
810
+ version: string;
811
+ datetime: string;
812
+ status: string;
813
+ code?: number | undefined;
814
+ message: string;
815
+ }, any>>;
816
+ };
817
+ }
package/build/api.js ADDED
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ var __importDefault = (this && this.__importDefault) || function (mod) {
19
+ return (mod && mod.__esModule) ? mod : { "default": mod };
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ const axios_1 = __importDefault(require("axios"));
23
+ __exportStar(require("./definitions"), exports);
24
+ class default_1 {
25
+ constructor(configOrInstance) {
26
+ this.axios = 'interceptors' in configOrInstance
27
+ ? configOrInstance
28
+ : axios_1.default.create(configOrInstance);
29
+ }
30
+ listExperience(params, options) {
31
+ return this.axios.get("/experiences", Object.assign({}, {
32
+ params: pick(params, "ids", "name", "resourceGroupIds", "status", "includeArchived", "sortBy", "sortOrder", "select", "page", "perPage"),
33
+ }, options));
34
+ }
35
+ createExperience(params, data, options) {
36
+ return this.axios.post("/experiences", data, options);
37
+ }
38
+ getExperience(params, options) {
39
+ return this.axios.get("/experiences/{id}".replace(/{id}/, String(params["id"])), Object.assign({}, {
40
+ params: pick(params, "versionId", "versions", "select"),
41
+ }, options));
42
+ }
43
+ updateExperience(params, data, options) {
44
+ return this.axios.patch("/experiences/{id}".replace(/{id}/, String(params["id"])), data, options);
45
+ }
46
+ deleteExperience(params, options) {
47
+ return this.axios.delete("/experiences/{id}".replace(/{id}/, String(params["id"])), options);
48
+ }
49
+ publishExperience(params, options) {
50
+ return this.axios.post("/experiences/{id}/publish".replace(/{id}/, String(params["id"])), {}, options);
51
+ }
52
+ listLoop(params, options) {
53
+ return this.axios.get("/loops", Object.assign({}, {
54
+ params: pick(params, "ids", "name", "resourceGroupIds", "status", "includeArchived", "sortBy", "sortOrder", "select", "page", "perPage"),
55
+ }, options));
56
+ }
57
+ createLoop(params, data, options) {
58
+ return this.axios.post("/loops", data, options);
59
+ }
60
+ getLoop(params, options) {
61
+ return this.axios.get("/loops/{id}".replace(/{id}/, String(params["id"])), Object.assign({}, {
62
+ params: pick(params, "versionId", "versions", "select"),
63
+ }, options));
64
+ }
65
+ updateLoop(params, data, options) {
66
+ return this.axios.patch("/loops/{id}".replace(/{id}/, String(params["id"])), data, options);
67
+ }
68
+ deleteLoop(params, options) {
69
+ return this.axios.delete("/loops/{id}".replace(/{id}/, String(params["id"])), options);
70
+ }
71
+ publishLoop(params, options) {
72
+ return this.axios.post("/loops/{id}/publish".replace(/{id}/, String(params["id"])), {}, options);
73
+ }
74
+ get Experience() {
75
+ return {
76
+ list: this.listExperience.bind(this),
77
+ create: this.createExperience.bind(this),
78
+ get: this.getExperience.bind(this),
79
+ update: this.updateExperience.bind(this),
80
+ delete: this.deleteExperience.bind(this),
81
+ publish: this.publishExperience.bind(this)
82
+ };
83
+ }
84
+ get Loop() {
85
+ return {
86
+ list: this.listLoop.bind(this),
87
+ create: this.createLoop.bind(this),
88
+ get: this.getLoop.bind(this),
89
+ update: this.updateLoop.bind(this),
90
+ delete: this.deleteLoop.bind(this),
91
+ publish: this.publishLoop.bind(this)
92
+ };
93
+ }
94
+ }
95
+ exports.default = default_1;
96
+ function pick(obj, ...keys) {
97
+ const ret = {};
98
+ keys.forEach(key => {
99
+ if (obj && Object.keys(obj).includes(key))
100
+ ret[key] = obj[key];
101
+ });
102
+ return ret;
103
+ }
104
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJza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EdBQUcsQ0FBQztBQUNmLENBQUMifQ==
@@ -0,0 +1,188 @@
1
+ declare type readonlyP = {
2
+ readonly?: '__readonly';
3
+ };
4
+ declare type writeonlyP = {
5
+ writeonly?: '__writeonly';
6
+ };
7
+ declare type Primitive = string | Function | number | boolean | Symbol | undefined | null | Date;
8
+ declare type PropsWithoutReadonly<T> = {
9
+ [key in keyof T]: T[key] extends readonlyP ? NonNullable<T[key]['readonly']> extends '__readonly' ? never : key : key;
10
+ }[keyof T];
11
+ export declare type WithoutReadonly<T> = T extends any ? T extends Primitive ? T : T extends Array<infer U> ? WithoutReadonly<U>[] : keyof T extends never ? unknown : {
12
+ [key in keyof Pick<T, PropsWithoutReadonly<T>>]: Pick<T, PropsWithoutReadonly<T>>[key] extends any ? WithoutReadonly<Pick<T, PropsWithoutReadonly<T>>[key]> : never;
13
+ } : never;
14
+ declare type PropsWithoutWriteonly<T> = {
15
+ [key in keyof T]: T[key] extends writeonlyP ? NonNullable<T[key]['writeonly']> extends '__writeonly' ? never : key : key;
16
+ }[keyof T];
17
+ export declare type WithoutWriteonly<T> = T extends any ? T extends Primitive ? T : T extends Array<infer U> ? WithoutWriteonly<U>[] : keyof T extends never ? unknown : {
18
+ [key in keyof Pick<T, PropsWithoutWriteonly<T>>]: Pick<T, PropsWithoutWriteonly<T>>[key] extends any ? WithoutWriteonly<Pick<T, PropsWithoutWriteonly<T>>[key]> : never;
19
+ } : never;
20
+ export declare enum ExperienceVersionState {
21
+ DRAFT = "draft",
22
+ LIVE = "live",
23
+ INACTIVE = "inactive"
24
+ }
25
+ export declare type ObjectId = string;
26
+ export declare type AnyValue = unknown | null;
27
+ export declare type SerializedExperienceVersion = {
28
+ readonly createdAt: (string) & readonlyP;
29
+ readonly updatedAt: (string) & readonlyP;
30
+ id: string;
31
+ readonly state: (ExperienceVersionState) & readonlyP;
32
+ workflows: {
33
+ id: ObjectId;
34
+ filter?: string;
35
+ score: number;
36
+ }[];
37
+ metadata?: {
38
+ [key: string]: AnyValue;
39
+ };
40
+ readonly lastSavedBy?: (ObjectId) & readonlyP;
41
+ changeDescription?: string;
42
+ };
43
+ export declare enum ExperienceStatus {
44
+ DRAFT = "draft",
45
+ PUBLISHING = "publishing",
46
+ PUBLISHED = "published",
47
+ ERROR = "error",
48
+ INACTIVE = "inactive"
49
+ }
50
+ export declare type SerializedExperience = {
51
+ readonly id: (string) & readonlyP;
52
+ readonly companyId: (string) & readonlyP;
53
+ resourceGroupIds: string[];
54
+ readonly versions: (SerializedExperienceVersion[]) & readonlyP;
55
+ readonly createdAt: (string) & readonlyP;
56
+ readonly updatedAt: (string) & readonlyP;
57
+ _id: ObjectId;
58
+ name: string;
59
+ description?: string;
60
+ categories?: string[];
61
+ readonly status: (ExperienceStatus) & readonlyP;
62
+ readonly archivedAt: (string | null) & readonlyP;
63
+ };
64
+ export declare type InternalResponse_Array_SerializedExperience = {
65
+ program: string;
66
+ version: string;
67
+ datetime: string;
68
+ status: string;
69
+ code?: number;
70
+ message: string;
71
+ data: SerializedExperience[];
72
+ };
73
+ export declare type InternalResponse_ = {
74
+ program: string;
75
+ version: string;
76
+ datetime: string;
77
+ status: string;
78
+ code?: number;
79
+ message: string;
80
+ data: {};
81
+ };
82
+ export declare type InternalResponse_SerializedExperience = {
83
+ program: string;
84
+ version: string;
85
+ datetime: string;
86
+ status: string;
87
+ code?: number;
88
+ message: string;
89
+ data: SerializedExperience;
90
+ };
91
+ export declare type SerializedExperience_With_ResourceGroupIds_Name_Description = {
92
+ resourceGroupIds: string[];
93
+ name: string;
94
+ description?: string;
95
+ };
96
+ export declare enum LoopVersionState {
97
+ DRAFT = "draft",
98
+ LIVE = "live",
99
+ INACTIVE = "inactive"
100
+ }
101
+ export declare type SerializedLoopVersion = {
102
+ experiences: string[];
103
+ readonly createdAt: (string) & readonlyP;
104
+ readonly updatedAt: (string) & readonlyP;
105
+ id: string;
106
+ readonly state: (LoopVersionState) & readonlyP;
107
+ metadata?: {
108
+ [key: string]: AnyValue;
109
+ };
110
+ readonly lastSavedBy?: (ObjectId) & readonlyP;
111
+ changeDescription?: string;
112
+ circuitBreakers?: {
113
+ level: "global" | "individual";
114
+ unit: "year" | "day" | "hour" | "minute" | "second";
115
+ value: number;
116
+ }[];
117
+ readonly forkedFrom?: (ObjectId) & readonlyP;
118
+ };
119
+ export declare enum LoopStatus {
120
+ DRAFT = "draft",
121
+ PUBLISHING = "publishing",
122
+ PUBLISHED = "published",
123
+ ERROR = "error",
124
+ INACTIVE = "inactive"
125
+ }
126
+ export declare type SerializedLoop = {
127
+ readonly id: (string) & readonlyP;
128
+ readonly companyId: (string) & readonlyP;
129
+ resourceGroupIds: string[];
130
+ readonly versions: (SerializedLoopVersion[]) & readonlyP;
131
+ readonly createdAt: (string) & readonlyP;
132
+ readonly updatedAt: (string) & readonlyP;
133
+ _id: ObjectId;
134
+ name: string;
135
+ description?: string;
136
+ readonly status: (LoopStatus) & readonlyP;
137
+ readonly archivedAt: (string | null) & readonlyP;
138
+ datasources: ({
139
+ type: "contacts";
140
+ shard?: string | {};
141
+ id: string;
142
+ } | {
143
+ type: "purchases";
144
+ filter?: {};
145
+ id: string;
146
+ } | {
147
+ type: "push";
148
+ channel: string[];
149
+ id: string;
150
+ })[];
151
+ };
152
+ export declare type InternalResponse_Array_SerializedLoop = {
153
+ program: string;
154
+ version: string;
155
+ datetime: string;
156
+ status: string;
157
+ code?: number;
158
+ message: string;
159
+ data: SerializedLoop[];
160
+ };
161
+ export declare type InternalResponse_SerializedLoop = {
162
+ program: string;
163
+ version: string;
164
+ datetime: string;
165
+ status: string;
166
+ code?: number;
167
+ message: string;
168
+ data: SerializedLoop;
169
+ };
170
+ export declare type SerializedLoop_With_ResourceGroupIds_Name_Description_Datasources = {
171
+ resourceGroupIds: string[];
172
+ name: string;
173
+ description?: string;
174
+ datasources: ({
175
+ type: "contacts";
176
+ shard?: string | {};
177
+ id: string;
178
+ } | {
179
+ type: "purchases";
180
+ filter?: {};
181
+ id: string;
182
+ } | {
183
+ type: "push";
184
+ channel: string[];
185
+ id: string;
186
+ })[];
187
+ };
188
+ export {};
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.LoopStatus = exports.LoopVersionState = exports.ExperienceStatus = exports.ExperienceVersionState = void 0;
6
+ var ExperienceVersionState;
7
+ (function (ExperienceVersionState) {
8
+ ExperienceVersionState["DRAFT"] = "draft";
9
+ ExperienceVersionState["LIVE"] = "live";
10
+ ExperienceVersionState["INACTIVE"] = "inactive";
11
+ })(ExperienceVersionState = exports.ExperienceVersionState || (exports.ExperienceVersionState = {}));
12
+ var ExperienceStatus;
13
+ (function (ExperienceStatus) {
14
+ ExperienceStatus["DRAFT"] = "draft";
15
+ ExperienceStatus["PUBLISHING"] = "publishing";
16
+ ExperienceStatus["PUBLISHED"] = "published";
17
+ ExperienceStatus["ERROR"] = "error";
18
+ ExperienceStatus["INACTIVE"] = "inactive";
19
+ })(ExperienceStatus = exports.ExperienceStatus || (exports.ExperienceStatus = {}));
20
+ var LoopVersionState;
21
+ (function (LoopVersionState) {
22
+ LoopVersionState["DRAFT"] = "draft";
23
+ LoopVersionState["LIVE"] = "live";
24
+ LoopVersionState["INACTIVE"] = "inactive";
25
+ })(LoopVersionState = exports.LoopVersionState || (exports.LoopVersionState = {}));
26
+ var LoopStatus;
27
+ (function (LoopStatus) {
28
+ LoopStatus["DRAFT"] = "draft";
29
+ LoopStatus["PUBLISHING"] = "publishing";
30
+ LoopStatus["PUBLISHED"] = "published";
31
+ LoopStatus["ERROR"] = "error";
32
+ LoopStatus["INACTIVE"] = "inactive";
33
+ })(LoopStatus = exports.LoopStatus || (exports.LoopStatus = {}));
34
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmaW5pdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9kZWZpbml0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0JBQW9CO0FBQ3BCLG9CQUFvQjs7O0FBa0NwQixJQUFZLHNCQUlYO0FBSkQsV0FBWSxzQkFBc0I7SUFDOUIseUNBQWUsQ0FBQTtJQUNmLHVDQUFhLENBQUE7SUFDYiwrQ0FBcUIsQ0FBQTtBQUN6QixDQUFDLEVBSlcsc0JBQXNCLEdBQXRCLDhCQUFzQixLQUF0Qiw4QkFBc0IsUUFJakM7QUFxQkQsSUFBWSxnQkFNWDtBQU5ELFdBQVksZ0JBQWdCO0lBQ3hCLG1DQUFlLENBQUE7SUFDZiw2Q0FBeUIsQ0FBQTtJQUN6QiwyQ0FBdUIsQ0FBQTtJQUN2QixtQ0FBZSxDQUFBO0lBQ2YseUNBQXFCLENBQUE7QUFDekIsQ0FBQyxFQU5XLGdCQUFnQixHQUFoQix3QkFBZ0IsS0FBaEIsd0JBQWdCLFFBTTNCO0FBaURELElBQVksZ0JBSVg7QUFKRCxXQUFZLGdCQUFnQjtJQUN4QixtQ0FBZSxDQUFBO0lBQ2YsaUNBQWEsQ0FBQTtJQUNiLHlDQUFxQixDQUFBO0FBQ3pCLENBQUMsRUFKVyxnQkFBZ0IsR0FBaEIsd0JBQWdCLEtBQWhCLHdCQUFnQixRQUkzQjtBQXFCRCxJQUFZLFVBTVg7QUFORCxXQUFZLFVBQVU7SUFDbEIsNkJBQWUsQ0FBQTtJQUNmLHVDQUF5QixDQUFBO0lBQ3pCLHFDQUF1QixDQUFBO0lBQ3ZCLDZCQUFlLENBQUE7SUFDZixtQ0FBcUIsQ0FBQTtBQUN6QixDQUFDLEVBTlcsVUFBVSxHQUFWLGtCQUFVLEtBQVYsa0JBQVUsUUFNckIifQ==
@@ -0,0 +1,8 @@
1
+ import Api from './api';
2
+ export * from './api';
3
+ export default Api;
4
+ declare type Unpromisify<T> = T extends Promise<infer U> ? U : T;
5
+ export declare type FunctionParamsForMethod<T extends Exclude<keyof InstanceType<typeof Api>, 'axios'>, U extends keyof InstanceType<typeof Api>[T]> = Parameters<InstanceType<typeof Api>[T][U]>;
6
+ export declare type ReturnForMethod<T extends Exclude<keyof InstanceType<typeof Api>, 'axios'>, U extends keyof InstanceType<typeof Api>[T]> = Unpromisify<ReturnType<InstanceType<typeof Api>[T][U]>>['data']['data'];
7
+ export declare type BodyForMethod<T extends Exclude<keyof InstanceType<typeof Api>, 'axios'>, U extends keyof InstanceType<typeof Api>[T]> = FunctionParamsForMethod<T, U>[1];
8
+ export declare type ParamsForMethod<T extends Exclude<keyof InstanceType<typeof Api>, 'axios'>, U extends keyof InstanceType<typeof Api>[T]> = FunctionParamsForMethod<T, U>[0];
package/build/index.js ADDED
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ const api_1 = __importDefault(require("./api"));
21
+ __exportStar(require("./api"), exports);
22
+ exports.default = api_1.default;
23
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsZ0RBQXVCO0FBRXZCLHdDQUFxQjtBQUNyQixrQkFBZSxhQUFHLENBQUEifQ==
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@rlvt/loop-openapi-client",
3
+ "version": "1.0.0+a4f6c3c",
4
+ "description": "Openapi client for reelevant service",
5
+ "main": "build/index.js",
6
+ "repository": "https://github.com/reelevant-tech/openapi-clients",
7
+ "author": "Reelevant",
8
+ "license": "MIT",
9
+ "publishconfig": {
10
+ "access": "public"
11
+ },
12
+ "scripts": {
13
+ "build": "tsc --project .",
14
+ "prepublish": "yarn build"
15
+ },
16
+ "peerDependencies": {
17
+ "axios": "*"
18
+ },
19
+ "devDependencies": {
20
+ "@types/node": "^18.8.5",
21
+ "typescript": "^4.8.4",
22
+ "axios": "^1.1.2"
23
+ }
24
+ }