@wraps.dev/client 0.3.0 → 0.5.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/dist/index.d.mts CHANGED
@@ -102,6 +102,26 @@ interface paths {
102
102
  patch: operations["patchV1ContactsById"];
103
103
  trace?: never;
104
104
  };
105
+ "/v1/contacts/{id}/topics": {
106
+ parameters: {
107
+ query?: never;
108
+ header?: never;
109
+ path?: never;
110
+ cookie?: never;
111
+ };
112
+ get?: never;
113
+ /**
114
+ * Replace contact topics
115
+ * @description Replaces all topic subscriptions for a contact. Use PATCH to add topics without removing existing ones.
116
+ */
117
+ put: operations["putV1ContactsByIdTopics"];
118
+ post?: never;
119
+ delete?: never;
120
+ options?: never;
121
+ head?: never;
122
+ patch?: never;
123
+ trace?: never;
124
+ };
105
125
  "/v1/batch/": {
106
126
  parameters: {
107
127
  query?: never;
@@ -146,6 +166,86 @@ interface paths {
146
166
  patch?: never;
147
167
  trace?: never;
148
168
  };
169
+ "/v1/events/": {
170
+ parameters: {
171
+ query?: never;
172
+ header?: never;
173
+ path?: never;
174
+ cookie?: never;
175
+ };
176
+ get?: never;
177
+ put?: never;
178
+ /**
179
+ * Ingest event
180
+ * @description Send a custom event to trigger workflows and resume waiting executions
181
+ */
182
+ post: operations["postV1Events"];
183
+ delete?: never;
184
+ options?: never;
185
+ head?: never;
186
+ patch?: never;
187
+ trace?: never;
188
+ };
189
+ "/v1/events/batch": {
190
+ parameters: {
191
+ query?: never;
192
+ header?: never;
193
+ path?: never;
194
+ cookie?: never;
195
+ };
196
+ get?: never;
197
+ put?: never;
198
+ /**
199
+ * Batch ingest events
200
+ * @description Process multiple events in a single request
201
+ */
202
+ post: operations["postV1EventsBatch"];
203
+ delete?: never;
204
+ options?: never;
205
+ head?: never;
206
+ patch?: never;
207
+ trace?: never;
208
+ };
209
+ "/v1/workflows/{workflowId}/trigger": {
210
+ parameters: {
211
+ query?: never;
212
+ header?: never;
213
+ path?: never;
214
+ cookie?: never;
215
+ };
216
+ get?: never;
217
+ put?: never;
218
+ /**
219
+ * Trigger workflow
220
+ * @description Trigger a specific workflow for a contact. The workflow must have triggerType 'api' and be enabled.
221
+ */
222
+ post: operations["postV1WorkflowsByWorkflowIdTrigger"];
223
+ delete?: never;
224
+ options?: never;
225
+ head?: never;
226
+ patch?: never;
227
+ trace?: never;
228
+ };
229
+ "/v1/workflows/{workflowId}/trigger/batch": {
230
+ parameters: {
231
+ query?: never;
232
+ header?: never;
233
+ path?: never;
234
+ cookie?: never;
235
+ };
236
+ get?: never;
237
+ put?: never;
238
+ /**
239
+ * Batch trigger workflow
240
+ * @description Trigger a workflow for multiple contacts at once. Each contact can have its own data that gets merged with common data.
241
+ */
242
+ post: operations["postV1WorkflowsByWorkflowIdTriggerBatch"];
243
+ delete?: never;
244
+ options?: never;
245
+ head?: never;
246
+ patch?: never;
247
+ trace?: never;
248
+ };
149
249
  "/webhooks/ses/{awsAccountNumber}": {
150
250
  parameters: {
151
251
  query?: never;
@@ -448,6 +548,40 @@ interface operations {
448
548
  };
449
549
  };
450
550
  };
551
+ putV1ContactsByIdTopics: {
552
+ parameters: {
553
+ query?: never;
554
+ header?: never;
555
+ path: {
556
+ id: string;
557
+ };
558
+ cookie?: never;
559
+ };
560
+ requestBody: {
561
+ content: {
562
+ "application/json": {
563
+ topicIds?: string[];
564
+ topicSlugs?: string[];
565
+ };
566
+ "multipart/form-data": {
567
+ topicIds?: string[];
568
+ topicSlugs?: string[];
569
+ };
570
+ "text/plain": {
571
+ topicIds?: string[];
572
+ topicSlugs?: string[];
573
+ };
574
+ };
575
+ };
576
+ responses: {
577
+ 200: {
578
+ headers: {
579
+ [name: string]: unknown;
580
+ };
581
+ content?: never;
582
+ };
583
+ };
584
+ };
451
585
  postV1Batch: {
452
586
  parameters: {
453
587
  query?: never;
@@ -601,6 +735,230 @@ interface operations {
601
735
  };
602
736
  };
603
737
  };
738
+ postV1Events: {
739
+ parameters: {
740
+ query?: never;
741
+ header?: never;
742
+ path?: never;
743
+ cookie?: never;
744
+ };
745
+ requestBody: {
746
+ content: {
747
+ "application/json": {
748
+ /** @description Event name (e.g., 'purchase.completed') */
749
+ name: string;
750
+ /** @description Contact ID */
751
+ contactId?: string;
752
+ /** @description Contact email (alternative to contactId) */
753
+ contactEmail?: string;
754
+ /** @description Event properties */
755
+ properties?: {
756
+ [key: string]: unknown;
757
+ };
758
+ };
759
+ "multipart/form-data": {
760
+ /** @description Event name (e.g., 'purchase.completed') */
761
+ name: string;
762
+ /** @description Contact ID */
763
+ contactId?: string;
764
+ /** @description Contact email (alternative to contactId) */
765
+ contactEmail?: string;
766
+ /** @description Event properties */
767
+ properties?: {
768
+ [key: string]: unknown;
769
+ };
770
+ };
771
+ "text/plain": {
772
+ /** @description Event name (e.g., 'purchase.completed') */
773
+ name: string;
774
+ /** @description Contact ID */
775
+ contactId?: string;
776
+ /** @description Contact email (alternative to contactId) */
777
+ contactEmail?: string;
778
+ /** @description Event properties */
779
+ properties?: {
780
+ [key: string]: unknown;
781
+ };
782
+ };
783
+ };
784
+ };
785
+ responses: {
786
+ 200: {
787
+ headers: {
788
+ [name: string]: unknown;
789
+ };
790
+ content?: never;
791
+ };
792
+ };
793
+ };
794
+ postV1EventsBatch: {
795
+ parameters: {
796
+ query?: never;
797
+ header?: never;
798
+ path?: never;
799
+ cookie?: never;
800
+ };
801
+ requestBody: {
802
+ content: {
803
+ "application/json": {
804
+ events: {
805
+ name: string;
806
+ contactId?: string;
807
+ contactEmail?: string;
808
+ properties?: {
809
+ [key: string]: unknown;
810
+ };
811
+ }[];
812
+ };
813
+ "multipart/form-data": {
814
+ events: {
815
+ name: string;
816
+ contactId?: string;
817
+ contactEmail?: string;
818
+ properties?: {
819
+ [key: string]: unknown;
820
+ };
821
+ }[];
822
+ };
823
+ "text/plain": {
824
+ events: {
825
+ name: string;
826
+ contactId?: string;
827
+ contactEmail?: string;
828
+ properties?: {
829
+ [key: string]: unknown;
830
+ };
831
+ }[];
832
+ };
833
+ };
834
+ };
835
+ responses: {
836
+ 200: {
837
+ headers: {
838
+ [name: string]: unknown;
839
+ };
840
+ content?: never;
841
+ };
842
+ };
843
+ };
844
+ postV1WorkflowsByWorkflowIdTrigger: {
845
+ parameters: {
846
+ query?: never;
847
+ header?: never;
848
+ path: {
849
+ /** @description Workflow ID to trigger */
850
+ workflowId: string;
851
+ };
852
+ cookie?: never;
853
+ };
854
+ requestBody: {
855
+ content: {
856
+ "application/json": {
857
+ /** @description Contact ID */
858
+ contactId?: string;
859
+ /** @description Contact email (alternative to contactId) */
860
+ contactEmail?: string;
861
+ /** @description Data to pass to the workflow as trigger data */
862
+ data?: {
863
+ [key: string]: unknown;
864
+ };
865
+ };
866
+ "multipart/form-data": {
867
+ /** @description Contact ID */
868
+ contactId?: string;
869
+ /** @description Contact email (alternative to contactId) */
870
+ contactEmail?: string;
871
+ /** @description Data to pass to the workflow as trigger data */
872
+ data?: {
873
+ [key: string]: unknown;
874
+ };
875
+ };
876
+ "text/plain": {
877
+ /** @description Contact ID */
878
+ contactId?: string;
879
+ /** @description Contact email (alternative to contactId) */
880
+ contactEmail?: string;
881
+ /** @description Data to pass to the workflow as trigger data */
882
+ data?: {
883
+ [key: string]: unknown;
884
+ };
885
+ };
886
+ };
887
+ };
888
+ responses: {
889
+ 200: {
890
+ headers: {
891
+ [name: string]: unknown;
892
+ };
893
+ content?: never;
894
+ };
895
+ };
896
+ };
897
+ postV1WorkflowsByWorkflowIdTriggerBatch: {
898
+ parameters: {
899
+ query?: never;
900
+ header?: never;
901
+ path: {
902
+ /** @description Workflow ID to trigger */
903
+ workflowId: string;
904
+ };
905
+ cookie?: never;
906
+ };
907
+ requestBody: {
908
+ content: {
909
+ "application/json": {
910
+ /** @description List of contacts to trigger the workflow for */
911
+ contacts: {
912
+ contactId?: string;
913
+ contactEmail?: string;
914
+ data?: {
915
+ [key: string]: unknown;
916
+ };
917
+ }[];
918
+ /** @description Common data to pass to all workflow triggers */
919
+ data?: {
920
+ [key: string]: unknown;
921
+ };
922
+ };
923
+ "multipart/form-data": {
924
+ /** @description List of contacts to trigger the workflow for */
925
+ contacts: {
926
+ contactId?: string;
927
+ contactEmail?: string;
928
+ data?: {
929
+ [key: string]: unknown;
930
+ };
931
+ }[];
932
+ /** @description Common data to pass to all workflow triggers */
933
+ data?: {
934
+ [key: string]: unknown;
935
+ };
936
+ };
937
+ "text/plain": {
938
+ /** @description List of contacts to trigger the workflow for */
939
+ contacts: {
940
+ contactId?: string;
941
+ contactEmail?: string;
942
+ data?: {
943
+ [key: string]: unknown;
944
+ };
945
+ }[];
946
+ /** @description Common data to pass to all workflow triggers */
947
+ data?: {
948
+ [key: string]: unknown;
949
+ };
950
+ };
951
+ };
952
+ };
953
+ responses: {
954
+ 200: {
955
+ headers: {
956
+ [name: string]: unknown;
957
+ };
958
+ content?: never;
959
+ };
960
+ };
961
+ };
604
962
  postWebhooksSesByAwsAccountNumber: {
605
963
  parameters: {
606
964
  query?: never;
package/dist/index.d.ts CHANGED
@@ -102,6 +102,26 @@ interface paths {
102
102
  patch: operations["patchV1ContactsById"];
103
103
  trace?: never;
104
104
  };
105
+ "/v1/contacts/{id}/topics": {
106
+ parameters: {
107
+ query?: never;
108
+ header?: never;
109
+ path?: never;
110
+ cookie?: never;
111
+ };
112
+ get?: never;
113
+ /**
114
+ * Replace contact topics
115
+ * @description Replaces all topic subscriptions for a contact. Use PATCH to add topics without removing existing ones.
116
+ */
117
+ put: operations["putV1ContactsByIdTopics"];
118
+ post?: never;
119
+ delete?: never;
120
+ options?: never;
121
+ head?: never;
122
+ patch?: never;
123
+ trace?: never;
124
+ };
105
125
  "/v1/batch/": {
106
126
  parameters: {
107
127
  query?: never;
@@ -146,6 +166,86 @@ interface paths {
146
166
  patch?: never;
147
167
  trace?: never;
148
168
  };
169
+ "/v1/events/": {
170
+ parameters: {
171
+ query?: never;
172
+ header?: never;
173
+ path?: never;
174
+ cookie?: never;
175
+ };
176
+ get?: never;
177
+ put?: never;
178
+ /**
179
+ * Ingest event
180
+ * @description Send a custom event to trigger workflows and resume waiting executions
181
+ */
182
+ post: operations["postV1Events"];
183
+ delete?: never;
184
+ options?: never;
185
+ head?: never;
186
+ patch?: never;
187
+ trace?: never;
188
+ };
189
+ "/v1/events/batch": {
190
+ parameters: {
191
+ query?: never;
192
+ header?: never;
193
+ path?: never;
194
+ cookie?: never;
195
+ };
196
+ get?: never;
197
+ put?: never;
198
+ /**
199
+ * Batch ingest events
200
+ * @description Process multiple events in a single request
201
+ */
202
+ post: operations["postV1EventsBatch"];
203
+ delete?: never;
204
+ options?: never;
205
+ head?: never;
206
+ patch?: never;
207
+ trace?: never;
208
+ };
209
+ "/v1/workflows/{workflowId}/trigger": {
210
+ parameters: {
211
+ query?: never;
212
+ header?: never;
213
+ path?: never;
214
+ cookie?: never;
215
+ };
216
+ get?: never;
217
+ put?: never;
218
+ /**
219
+ * Trigger workflow
220
+ * @description Trigger a specific workflow for a contact. The workflow must have triggerType 'api' and be enabled.
221
+ */
222
+ post: operations["postV1WorkflowsByWorkflowIdTrigger"];
223
+ delete?: never;
224
+ options?: never;
225
+ head?: never;
226
+ patch?: never;
227
+ trace?: never;
228
+ };
229
+ "/v1/workflows/{workflowId}/trigger/batch": {
230
+ parameters: {
231
+ query?: never;
232
+ header?: never;
233
+ path?: never;
234
+ cookie?: never;
235
+ };
236
+ get?: never;
237
+ put?: never;
238
+ /**
239
+ * Batch trigger workflow
240
+ * @description Trigger a workflow for multiple contacts at once. Each contact can have its own data that gets merged with common data.
241
+ */
242
+ post: operations["postV1WorkflowsByWorkflowIdTriggerBatch"];
243
+ delete?: never;
244
+ options?: never;
245
+ head?: never;
246
+ patch?: never;
247
+ trace?: never;
248
+ };
149
249
  "/webhooks/ses/{awsAccountNumber}": {
150
250
  parameters: {
151
251
  query?: never;
@@ -448,6 +548,40 @@ interface operations {
448
548
  };
449
549
  };
450
550
  };
551
+ putV1ContactsByIdTopics: {
552
+ parameters: {
553
+ query?: never;
554
+ header?: never;
555
+ path: {
556
+ id: string;
557
+ };
558
+ cookie?: never;
559
+ };
560
+ requestBody: {
561
+ content: {
562
+ "application/json": {
563
+ topicIds?: string[];
564
+ topicSlugs?: string[];
565
+ };
566
+ "multipart/form-data": {
567
+ topicIds?: string[];
568
+ topicSlugs?: string[];
569
+ };
570
+ "text/plain": {
571
+ topicIds?: string[];
572
+ topicSlugs?: string[];
573
+ };
574
+ };
575
+ };
576
+ responses: {
577
+ 200: {
578
+ headers: {
579
+ [name: string]: unknown;
580
+ };
581
+ content?: never;
582
+ };
583
+ };
584
+ };
451
585
  postV1Batch: {
452
586
  parameters: {
453
587
  query?: never;
@@ -601,6 +735,230 @@ interface operations {
601
735
  };
602
736
  };
603
737
  };
738
+ postV1Events: {
739
+ parameters: {
740
+ query?: never;
741
+ header?: never;
742
+ path?: never;
743
+ cookie?: never;
744
+ };
745
+ requestBody: {
746
+ content: {
747
+ "application/json": {
748
+ /** @description Event name (e.g., 'purchase.completed') */
749
+ name: string;
750
+ /** @description Contact ID */
751
+ contactId?: string;
752
+ /** @description Contact email (alternative to contactId) */
753
+ contactEmail?: string;
754
+ /** @description Event properties */
755
+ properties?: {
756
+ [key: string]: unknown;
757
+ };
758
+ };
759
+ "multipart/form-data": {
760
+ /** @description Event name (e.g., 'purchase.completed') */
761
+ name: string;
762
+ /** @description Contact ID */
763
+ contactId?: string;
764
+ /** @description Contact email (alternative to contactId) */
765
+ contactEmail?: string;
766
+ /** @description Event properties */
767
+ properties?: {
768
+ [key: string]: unknown;
769
+ };
770
+ };
771
+ "text/plain": {
772
+ /** @description Event name (e.g., 'purchase.completed') */
773
+ name: string;
774
+ /** @description Contact ID */
775
+ contactId?: string;
776
+ /** @description Contact email (alternative to contactId) */
777
+ contactEmail?: string;
778
+ /** @description Event properties */
779
+ properties?: {
780
+ [key: string]: unknown;
781
+ };
782
+ };
783
+ };
784
+ };
785
+ responses: {
786
+ 200: {
787
+ headers: {
788
+ [name: string]: unknown;
789
+ };
790
+ content?: never;
791
+ };
792
+ };
793
+ };
794
+ postV1EventsBatch: {
795
+ parameters: {
796
+ query?: never;
797
+ header?: never;
798
+ path?: never;
799
+ cookie?: never;
800
+ };
801
+ requestBody: {
802
+ content: {
803
+ "application/json": {
804
+ events: {
805
+ name: string;
806
+ contactId?: string;
807
+ contactEmail?: string;
808
+ properties?: {
809
+ [key: string]: unknown;
810
+ };
811
+ }[];
812
+ };
813
+ "multipart/form-data": {
814
+ events: {
815
+ name: string;
816
+ contactId?: string;
817
+ contactEmail?: string;
818
+ properties?: {
819
+ [key: string]: unknown;
820
+ };
821
+ }[];
822
+ };
823
+ "text/plain": {
824
+ events: {
825
+ name: string;
826
+ contactId?: string;
827
+ contactEmail?: string;
828
+ properties?: {
829
+ [key: string]: unknown;
830
+ };
831
+ }[];
832
+ };
833
+ };
834
+ };
835
+ responses: {
836
+ 200: {
837
+ headers: {
838
+ [name: string]: unknown;
839
+ };
840
+ content?: never;
841
+ };
842
+ };
843
+ };
844
+ postV1WorkflowsByWorkflowIdTrigger: {
845
+ parameters: {
846
+ query?: never;
847
+ header?: never;
848
+ path: {
849
+ /** @description Workflow ID to trigger */
850
+ workflowId: string;
851
+ };
852
+ cookie?: never;
853
+ };
854
+ requestBody: {
855
+ content: {
856
+ "application/json": {
857
+ /** @description Contact ID */
858
+ contactId?: string;
859
+ /** @description Contact email (alternative to contactId) */
860
+ contactEmail?: string;
861
+ /** @description Data to pass to the workflow as trigger data */
862
+ data?: {
863
+ [key: string]: unknown;
864
+ };
865
+ };
866
+ "multipart/form-data": {
867
+ /** @description Contact ID */
868
+ contactId?: string;
869
+ /** @description Contact email (alternative to contactId) */
870
+ contactEmail?: string;
871
+ /** @description Data to pass to the workflow as trigger data */
872
+ data?: {
873
+ [key: string]: unknown;
874
+ };
875
+ };
876
+ "text/plain": {
877
+ /** @description Contact ID */
878
+ contactId?: string;
879
+ /** @description Contact email (alternative to contactId) */
880
+ contactEmail?: string;
881
+ /** @description Data to pass to the workflow as trigger data */
882
+ data?: {
883
+ [key: string]: unknown;
884
+ };
885
+ };
886
+ };
887
+ };
888
+ responses: {
889
+ 200: {
890
+ headers: {
891
+ [name: string]: unknown;
892
+ };
893
+ content?: never;
894
+ };
895
+ };
896
+ };
897
+ postV1WorkflowsByWorkflowIdTriggerBatch: {
898
+ parameters: {
899
+ query?: never;
900
+ header?: never;
901
+ path: {
902
+ /** @description Workflow ID to trigger */
903
+ workflowId: string;
904
+ };
905
+ cookie?: never;
906
+ };
907
+ requestBody: {
908
+ content: {
909
+ "application/json": {
910
+ /** @description List of contacts to trigger the workflow for */
911
+ contacts: {
912
+ contactId?: string;
913
+ contactEmail?: string;
914
+ data?: {
915
+ [key: string]: unknown;
916
+ };
917
+ }[];
918
+ /** @description Common data to pass to all workflow triggers */
919
+ data?: {
920
+ [key: string]: unknown;
921
+ };
922
+ };
923
+ "multipart/form-data": {
924
+ /** @description List of contacts to trigger the workflow for */
925
+ contacts: {
926
+ contactId?: string;
927
+ contactEmail?: string;
928
+ data?: {
929
+ [key: string]: unknown;
930
+ };
931
+ }[];
932
+ /** @description Common data to pass to all workflow triggers */
933
+ data?: {
934
+ [key: string]: unknown;
935
+ };
936
+ };
937
+ "text/plain": {
938
+ /** @description List of contacts to trigger the workflow for */
939
+ contacts: {
940
+ contactId?: string;
941
+ contactEmail?: string;
942
+ data?: {
943
+ [key: string]: unknown;
944
+ };
945
+ }[];
946
+ /** @description Common data to pass to all workflow triggers */
947
+ data?: {
948
+ [key: string]: unknown;
949
+ };
950
+ };
951
+ };
952
+ };
953
+ responses: {
954
+ 200: {
955
+ headers: {
956
+ [name: string]: unknown;
957
+ };
958
+ content?: never;
959
+ };
960
+ };
961
+ };
604
962
  postWebhooksSesByAwsAccountNumber: {
605
963
  parameters: {
606
964
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wraps.dev/client",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Type-safe API client for Wraps Platform",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",