@@ -63,6 +63,7 @@ For more information about the API: [Novu Documentation](https://docs.novu.co)
63
63
<!-- Start Table of Contents [toc] -->
64
64
## Table of Contents
65
65
<!-- $toc-max-depth=2 -->
66
+ * [ Novu PHP SDK] ( #novu-php-sdk )
66
67
* [ SDK Installation] ( #sdk-installation )
67
68
* [ SDK Example Usage] ( #sdk-example-usage )
68
69
* [ Authentication] ( #authentication )
@@ -109,9 +110,6 @@ $sdk = novu\Novu::builder()
109
110
110
111
$triggerEventRequestDto = new Components\TriggerEventRequestDto(
111
112
workflowId: 'workflow_identifier',
112
- to: new Components\SubscriberPayloadDto(
113
- subscriberId: '<id >',
114
- ),
115
113
payload: [
116
114
'comment_id' => 'string',
117
115
'post' => [
@@ -125,6 +123,9 @@ $triggerEventRequestDto = new Components\TriggerEventRequestDto(
125
123
],
126
124
],
127
125
],
126
+ to: new Components\SubscriberPayloadDto(
127
+ subscriberId: '<id >',
128
+ ),
128
129
);
129
130
130
131
$response = $sdk->trigger(
@@ -224,10 +225,6 @@ $bulkTriggerEventDto = new Components\BulkTriggerEventDto(
224
225
events: [
225
226
new Components\TriggerEventRequestDto(
226
227
workflowId: 'workflow_identifier',
227
- to: new Components\TopicPayloadDto(
228
- topicKey: '<value >',
229
- type: Components\TriggerRecipientsTypeEnum::Topic,
230
- ),
231
228
payload: [
232
229
'comment_id' => 'string',
233
230
'post' => [
@@ -241,6 +238,10 @@ $bulkTriggerEventDto = new Components\BulkTriggerEventDto(
241
238
],
242
239
],
243
240
],
241
+ to: new Components\TopicPayloadDto(
242
+ topicKey: '<value >',
243
+ type: Components\TriggerRecipientsTypeEnum::Topic,
244
+ ),
244
245
),
245
246
],
246
247
);
@@ -283,19 +284,28 @@ $sdk = novu\Novu::builder()
283
284
)
284
285
->build();
285
286
286
- $triggerEventToAllRequestDto = new Components\TriggerEventToAllRequestDto (
287
- name : '< value > ',
287
+ $triggerEventRequestDto = new Components\TriggerEventRequestDto (
288
+ workflowId : 'workflow_identifier ',
288
289
payload: [
289
290
'comment_id' => 'string',
290
291
'post' => [
291
292
'text' => 'string',
292
293
],
293
294
],
294
- overrides: new Components\TriggerEventToAllRequestDtoOverrides(),
295
+ overrides: [
296
+ 'fcm' => [
297
+ 'data' => [
298
+ 'key' => 'value',
299
+ ],
300
+ ],
301
+ ],
302
+ to: new Components\SubscriberPayloadDto(
303
+ subscriberId: '<id >',
304
+ ),
295
305
);
296
306
297
- $response = $sdk->triggerBroadcast (
298
- triggerEventToAllRequestDto : $triggerEventToAllRequestDto ,
307
+ $response = $sdk->trigger (
308
+ triggerEventRequestDto : $triggerEventRequestDto ,
299
309
idempotencyKey: '<value >'
300
310
301
311
);
@@ -314,27 +324,27 @@ if ($response->triggerEventResponseDto !== null) {
314
324
315
325
### [ integrations] ( docs/sdks/integrations/README.md )
316
326
317
- * [ create] ( docs/sdks/integrations/README.md#create ) - Create integration
318
- * [ listActive] ( docs/sdks/integrations/README.md#listactive ) - Get active integrations
319
327
* [ list] ( docs/sdks/integrations/README.md#list ) - Get integrations
328
+ * [ create] ( docs/sdks/integrations/README.md#create ) - Create integration
329
+ * [ update] ( docs/sdks/integrations/README.md#update ) - Update integration
320
330
* [ delete] ( docs/sdks/integrations/README.md#delete ) - Delete integration
321
331
* [ setAsPrimary] ( docs/sdks/integrations/README.md#setasprimary ) - Set integration as primary
322
- * [ update ] ( docs/sdks/integrations/README.md#update ) - Update integration
332
+ * [ listActive ] ( docs/sdks/integrations/README.md#listactive ) - Get active integrations
323
333
324
334
#### [ integrations->webhooks] ( docs/sdks/webhooks/README.md )
325
335
326
336
* [ getSupportStatus] ( docs/sdks/webhooks/README.md#getsupportstatus ) - Get webhook support status for provider
327
337
328
338
### [ messages] ( docs/sdks/messages/README.md )
329
339
340
+ * [ get] ( docs/sdks/messages/README.md#get ) - Get messages
330
341
* [ delete] ( docs/sdks/messages/README.md#delete ) - Delete message
331
342
* [ deleteByTransactionId] ( docs/sdks/messages/README.md#deletebytransactionid ) - Delete messages by transactionId
332
- * [ get] ( docs/sdks/messages/README.md#get ) - Get messages
333
343
334
344
### [ notifications] ( docs/sdks/notifications/README.md )
335
345
336
- * [ get] ( docs/sdks/notifications/README.md#get ) - Get notification
337
346
* [ list] ( docs/sdks/notifications/README.md#list ) - Get notifications
347
+ * [ get] ( docs/sdks/notifications/README.md#get ) - Get notification
338
348
339
349
#### [ notifications->stats] ( docs/sdks/stats/README.md )
340
350
@@ -346,21 +356,22 @@ if ($response->triggerEventResponseDto !== null) {
346
356
347
357
### [ Novu SDK] ( docs/sdks/novu/README.md )
348
358
349
- * [ triggerBroadcast] ( docs/sdks/novu/README.md#triggerbroadcast ) - Broadcast event to all
350
- * [ cancel] ( docs/sdks/novu/README.md#cancel ) - Cancel triggered event
351
359
* [ trigger] ( docs/sdks/novu/README.md#trigger ) - Trigger event
360
+ * [ cancel] ( docs/sdks/novu/README.md#cancel ) - Cancel triggered event
361
+ * [ triggerBroadcast] ( docs/sdks/novu/README.md#triggerbroadcast ) - Broadcast event to all
352
362
* [ triggerBulk] ( docs/sdks/novu/README.md#triggerbulk ) - Bulk trigger event
353
363
354
364
### [ subscribers] ( docs/sdks/subscribers/README.md )
355
365
366
+ * [ search] ( docs/sdks/subscribers/README.md#search ) - Search for subscribers
356
367
* [ create] ( docs/sdks/subscribers/README.md#create ) - Create subscriber
357
368
* [ get] ( docs/sdks/subscribers/README.md#get ) - Get subscriber
358
369
* [ patch] ( docs/sdks/subscribers/README.md#patch ) - Patch subscriber
359
370
* [ delete] ( docs/sdks/subscribers/README.md#delete ) - Delete subscriber
360
- * [ search] ( docs/sdks/subscribers/README.md#search ) - Search for subscribers
361
- * [ updatePreferences] ( docs/sdks/subscribers/README.md#updatepreferences ) - Update subscriber global or workflow specific preferences
362
- * [ createBulk] ( docs/sdks/subscribers/README.md#createbulk ) - Bulk create subscribers
363
371
* [ list] ( docs/sdks/subscribers/README.md#list ) - Get subscribers
372
+ * [ update] ( docs/sdks/subscribers/README.md#update ) - Upsert subscriber
373
+ * [ createBulk] ( docs/sdks/subscribers/README.md#createbulk ) - Bulk create subscribers
374
+ * [ updatePreferences] ( docs/sdks/subscribers/README.md#updatepreferences ) - Update subscriber global or workflow specific preferences
364
375
* [ updateCredentials] ( docs/sdks/subscribers/README.md#updatecredentials ) - Update subscriber credentials
365
376
* [ updateOnlineStatus] ( docs/sdks/subscribers/README.md#updateonlinestatus ) - Update subscriber online status
366
377
@@ -383,8 +394,8 @@ if ($response->triggerEventResponseDto !== null) {
383
394
384
395
### [ subscribersCredentials] ( docs/sdks/subscriberscredentials/README.md )
385
396
386
- * [ deleteProvider] ( docs/sdks/subscriberscredentials/README.md#deleteprovider ) - Delete subscriber credentials by providerId
387
397
* [ append] ( docs/sdks/subscriberscredentials/README.md#append ) - Modify subscriber credentials
398
+ * [ deleteProvider] ( docs/sdks/subscriberscredentials/README.md#deleteprovider ) - Delete subscriber credentials by providerId
388
399
389
400
### [ subscribersMessages] ( docs/sdks/subscribersmessages/README.md )
390
401
@@ -401,9 +412,9 @@ if ($response->triggerEventResponseDto !== null) {
401
412
### [ topics] ( docs/sdks/topics/README.md )
402
413
403
414
* [ create] ( docs/sdks/topics/README.md#create ) - Topic creation
415
+ * [ list] ( docs/sdks/topics/README.md#list ) - Get topic list filtered
404
416
* [ delete] ( docs/sdks/topics/README.md#delete ) - Delete topic
405
417
* [ get] ( docs/sdks/topics/README.md#get ) - Get topic
406
- * [ list] ( docs/sdks/topics/README.md#list ) - Get topic list filtered
407
418
* [ rename] ( docs/sdks/topics/README.md#rename ) - Rename a topic
408
419
409
420
#### [ topics->subscribers] ( docs/sdks/novutopicssubscribers/README.md )
@@ -415,6 +426,16 @@ if ($response->triggerEventResponseDto !== null) {
415
426
416
427
* [ check] ( docs/sdks/topicssubscribers/README.md#check ) - Check topic subscriber
417
428
429
+ ### [ workflows] ( docs/sdks/workflows/README.md )
430
+
431
+ * [ create] ( docs/sdks/workflows/README.md#create )
432
+ * [ workflowControllerSearchWorkflows] ( docs/sdks/workflows/README.md#workflowcontrollersearchworkflows )
433
+ * [ update] ( docs/sdks/workflows/README.md#update )
434
+ * [ retrieve] ( docs/sdks/workflows/README.md#retrieve )
435
+ * [ delete] ( docs/sdks/workflows/README.md#delete )
436
+ * [ workflowControllerPatchWorkflow] ( docs/sdks/workflows/README.md#workflowcontrollerpatchworkflow )
437
+ * [ workflowControllerSync] ( docs/sdks/workflows/README.md#workflowcontrollersync )
438
+
418
439
</details >
419
440
<!-- End Available Resources and Operations [operations] -->
420
441
@@ -477,19 +498,28 @@ $sdk = novu\Novu::builder()
477
498
)
478
499
->build();
479
500
480
- $triggerEventToAllRequestDto = new Components\TriggerEventToAllRequestDto (
481
- name : '< value > ',
501
+ $triggerEventRequestDto = new Components\TriggerEventRequestDto (
502
+ workflowId : 'workflow_identifier ',
482
503
payload: [
483
504
'comment_id' => 'string',
484
505
'post' => [
485
506
'text' => 'string',
486
507
],
487
508
],
488
- overrides: new Components\TriggerEventToAllRequestDtoOverrides(),
509
+ overrides: [
510
+ 'fcm' => [
511
+ 'data' => [
512
+ 'key' => 'value',
513
+ ],
514
+ ],
515
+ ],
516
+ to: new Components\SubscriberPayloadDto(
517
+ subscriberId: '<id >',
518
+ ),
489
519
);
490
520
491
- $response = $sdk->triggerBroadcast (
492
- triggerEventToAllRequestDto : $triggerEventToAllRequestDto ,
521
+ $response = $sdk->trigger (
522
+ triggerEventRequestDto : $triggerEventRequestDto ,
493
523
idempotencyKey: '<value >',
494
524
options: Utils\Options->builder()->setRetryConfig(
495
525
new Retry\RetryConfigBackoff(
@@ -532,19 +562,28 @@ $sdk = novu\Novu::builder()
532
562
)
533
563
->build();
534
564
535
- $triggerEventToAllRequestDto = new Components\TriggerEventToAllRequestDto (
536
- name : '< value > ',
565
+ $triggerEventRequestDto = new Components\TriggerEventRequestDto (
566
+ workflowId : 'workflow_identifier ',
537
567
payload: [
538
568
'comment_id' => 'string',
539
569
'post' => [
540
570
'text' => 'string',
541
571
],
542
572
],
543
- overrides: new Components\TriggerEventToAllRequestDtoOverrides(),
573
+ overrides: [
574
+ 'fcm' => [
575
+ 'data' => [
576
+ 'key' => 'value',
577
+ ],
578
+ ],
579
+ ],
580
+ to: new Components\SubscriberPayloadDto(
581
+ subscriberId: '<id >',
582
+ ),
544
583
);
545
584
546
- $response = $sdk->triggerBroadcast (
547
- triggerEventToAllRequestDto : $triggerEventToAllRequestDto ,
585
+ $response = $sdk->trigger (
586
+ triggerEventRequestDto : $triggerEventRequestDto ,
548
587
idempotencyKey: '<value >'
549
588
550
589
);
@@ -569,7 +608,7 @@ By default an API error will raise a `Errors\APIException` exception, which has
569
608
| ` $rawResponse ` | * ?\Psr\Http\Message\ResponseInterface* | The raw HTTP response |
570
609
| ` $body ` | * string* | The response content |
571
610
572
- When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective * Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the ` triggerBroadcast ` method throws the following exceptions:
611
+ When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective * Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the ` trigger ` method throws the following exceptions:
573
612
574
613
| Error Type | Status Code | Content Type |
575
614
| ------------------------- | -------------------------------------- | ---------------- |
@@ -597,19 +636,28 @@ $sdk = novu\Novu::builder()
597
636
->build();
598
637
599
638
try {
600
- $triggerEventToAllRequestDto = new Components\TriggerEventToAllRequestDto (
601
- name : '< value > ',
639
+ $triggerEventRequestDto = new Components\TriggerEventRequestDto (
640
+ workflowId : 'workflow_identifier ',
602
641
payload: [
603
642
'comment_id' => 'string',
604
643
'post' => [
605
644
'text' => 'string',
606
645
],
607
646
],
608
- overrides: new Components\TriggerEventToAllRequestDtoOverrides(),
647
+ overrides: [
648
+ 'fcm' => [
649
+ 'data' => [
650
+ 'key' => 'value',
651
+ ],
652
+ ],
653
+ ],
654
+ to: new Components\SubscriberPayloadDto(
655
+ subscriberId: '<id >',
656
+ ),
609
657
);
610
658
611
- $response = $sdk->triggerBroadcast (
612
- triggerEventToAllRequestDto : $triggerEventToAllRequestDto ,
659
+ $response = $sdk->trigger (
660
+ triggerEventRequestDto : $triggerEventRequestDto ,
613
661
idempotencyKey: '<value >'
614
662
615
663
);
@@ -665,19 +713,28 @@ $sdk = novu\Novu::builder()
665
713
)
666
714
->build();
667
715
668
- $triggerEventToAllRequestDto = new Components\TriggerEventToAllRequestDto (
669
- name : '< value > ',
716
+ $triggerEventRequestDto = new Components\TriggerEventRequestDto (
717
+ workflowId : 'workflow_identifier ',
670
718
payload: [
671
719
'comment_id' => 'string',
672
720
'post' => [
673
721
'text' => 'string',
674
722
],
675
723
],
676
- overrides: new Components\TriggerEventToAllRequestDtoOverrides(),
724
+ overrides: [
725
+ 'fcm' => [
726
+ 'data' => [
727
+ 'key' => 'value',
728
+ ],
729
+ ],
730
+ ],
731
+ to: new Components\SubscriberPayloadDto(
732
+ subscriberId: '<id >',
733
+ ),
677
734
);
678
735
679
- $response = $sdk->triggerBroadcast (
680
- triggerEventToAllRequestDto : $triggerEventToAllRequestDto ,
736
+ $response = $sdk->trigger (
737
+ triggerEventRequestDto : $triggerEventRequestDto ,
681
738
idempotencyKey: '<value >'
682
739
683
740
);
@@ -705,19 +762,28 @@ $sdk = novu\Novu::builder()
705
762
)
706
763
->build();
707
764
708
- $triggerEventToAllRequestDto = new Components\TriggerEventToAllRequestDto (
709
- name : '< value > ',
765
+ $triggerEventRequestDto = new Components\TriggerEventRequestDto (
766
+ workflowId : 'workflow_identifier ',
710
767
payload: [
711
768
'comment_id' => 'string',
712
769
'post' => [
713
770
'text' => 'string',
714
771
],
715
772
],
716
- overrides: new Components\TriggerEventToAllRequestDtoOverrides(),
773
+ overrides: [
774
+ 'fcm' => [
775
+ 'data' => [
776
+ 'key' => 'value',
777
+ ],
778
+ ],
779
+ ],
780
+ to: new Components\SubscriberPayloadDto(
781
+ subscriberId: '<id >',
782
+ ),
717
783
);
718
784
719
- $response = $sdk->triggerBroadcast (
720
- triggerEventToAllRequestDto : $triggerEventToAllRequestDto ,
785
+ $response = $sdk->trigger (
786
+ triggerEventRequestDto : $triggerEventRequestDto ,
721
787
idempotencyKey: '<value >'
722
788
723
789
);
0 commit comments