appwrite 19.1.0 → 19.3.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.
@@ -11,14 +11,16 @@ module Appwrite
11
11
  #
12
12
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType
13
13
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
14
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
14
15
  #
15
16
  # @return [MessageList]
16
- def list_messages(queries: nil, search: nil)
17
+ def list_messages(queries: nil, search: nil, total: nil)
17
18
  api_path = '/messaging/messages'
18
19
 
19
20
  api_params = {
20
21
  queries: queries,
21
22
  search: search,
23
+ total: total,
22
24
  }
23
25
 
24
26
  api_headers = {
@@ -430,9 +432,10 @@ module Appwrite
430
432
  #
431
433
  # @param [String] message_id Message ID.
432
434
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
435
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
433
436
  #
434
437
  # @return [LogList]
435
- def list_message_logs(message_id:, queries: nil)
438
+ def list_message_logs(message_id:, queries: nil, total: nil)
436
439
  api_path = '/messaging/messages/{messageId}/logs'
437
440
  .gsub('{messageId}', message_id)
438
441
 
@@ -442,6 +445,7 @@ module Appwrite
442
445
 
443
446
  api_params = {
444
447
  queries: queries,
448
+ total: total,
445
449
  }
446
450
 
447
451
  api_headers = {
@@ -460,9 +464,10 @@ module Appwrite
460
464
  #
461
465
  # @param [String] message_id Message ID.
462
466
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType
467
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
463
468
  #
464
469
  # @return [TargetList]
465
- def list_targets(message_id:, queries: nil)
470
+ def list_targets(message_id:, queries: nil, total: nil)
466
471
  api_path = '/messaging/messages/{messageId}/targets'
467
472
  .gsub('{messageId}', message_id)
468
473
 
@@ -472,6 +477,7 @@ module Appwrite
472
477
 
473
478
  api_params = {
474
479
  queries: queries,
480
+ total: total,
475
481
  }
476
482
 
477
483
  api_headers = {
@@ -490,14 +496,16 @@ module Appwrite
490
496
  #
491
497
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled
492
498
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
499
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
493
500
  #
494
501
  # @return [ProviderList]
495
- def list_providers(queries: nil, search: nil)
502
+ def list_providers(queries: nil, search: nil, total: nil)
496
503
  api_path = '/messaging/providers'
497
504
 
498
505
  api_params = {
499
506
  queries: queries,
500
507
  search: search,
508
+ total: total,
501
509
  }
502
510
 
503
511
  api_headers = {
@@ -856,6 +864,96 @@ module Appwrite
856
864
  )
857
865
  end
858
866
 
867
+ # Create a new Resend provider.
868
+ #
869
+ # @param [String] provider_id Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
870
+ # @param [String] name Provider name.
871
+ # @param [String] api_key Resend API key.
872
+ # @param [String] from_name Sender Name.
873
+ # @param [String] from_email Sender email address.
874
+ # @param [String] reply_to_name Name set in the reply to field for the mail. Default value is sender name.
875
+ # @param [String] reply_to_email Email set in the reply to field for the mail. Default value is sender email.
876
+ # @param [] enabled Set as enabled.
877
+ #
878
+ # @return [Provider]
879
+ def create_resend_provider(provider_id:, name:, api_key: nil, from_name: nil, from_email: nil, reply_to_name: nil, reply_to_email: nil, enabled: nil)
880
+ api_path = '/messaging/providers/resend'
881
+
882
+ if provider_id.nil?
883
+ raise Appwrite::Exception.new('Missing required parameter: "providerId"')
884
+ end
885
+
886
+ if name.nil?
887
+ raise Appwrite::Exception.new('Missing required parameter: "name"')
888
+ end
889
+
890
+ api_params = {
891
+ providerId: provider_id,
892
+ name: name,
893
+ apiKey: api_key,
894
+ fromName: from_name,
895
+ fromEmail: from_email,
896
+ replyToName: reply_to_name,
897
+ replyToEmail: reply_to_email,
898
+ enabled: enabled,
899
+ }
900
+
901
+ api_headers = {
902
+ "content-type": 'application/json',
903
+ }
904
+
905
+ @client.call(
906
+ method: 'POST',
907
+ path: api_path,
908
+ headers: api_headers,
909
+ params: api_params,
910
+ response_type: Models::Provider
911
+ )
912
+ end
913
+
914
+ # Update a Resend provider by its unique ID.
915
+ #
916
+ # @param [String] provider_id Provider ID.
917
+ # @param [String] name Provider name.
918
+ # @param [] enabled Set as enabled.
919
+ # @param [String] api_key Resend API key.
920
+ # @param [String] from_name Sender Name.
921
+ # @param [String] from_email Sender email address.
922
+ # @param [String] reply_to_name Name set in the Reply To field for the mail. Default value is Sender Name.
923
+ # @param [String] reply_to_email Email set in the Reply To field for the mail. Default value is Sender Email.
924
+ #
925
+ # @return [Provider]
926
+ def update_resend_provider(provider_id:, name: nil, enabled: nil, api_key: nil, from_name: nil, from_email: nil, reply_to_name: nil, reply_to_email: nil)
927
+ api_path = '/messaging/providers/resend/{providerId}'
928
+ .gsub('{providerId}', provider_id)
929
+
930
+ if provider_id.nil?
931
+ raise Appwrite::Exception.new('Missing required parameter: "providerId"')
932
+ end
933
+
934
+ api_params = {
935
+ name: name,
936
+ enabled: enabled,
937
+ apiKey: api_key,
938
+ fromName: from_name,
939
+ fromEmail: from_email,
940
+ replyToName: reply_to_name,
941
+ replyToEmail: reply_to_email,
942
+ }
943
+
944
+ api_headers = {
945
+ "content-type": 'application/json',
946
+ }
947
+
948
+ @client.call(
949
+ method: 'PATCH',
950
+ path: api_path,
951
+ headers: api_headers,
952
+ params: api_params,
953
+ response_type: Models::Provider
954
+ )
955
+ end
956
+
859
957
  # Create a new Sendgrid provider.
860
958
  #
861
959
  # @param [String] provider_id Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
@@ -1453,9 +1551,10 @@ module Appwrite
1453
1551
  #
1454
1552
  # @param [String] provider_id Provider ID.
1455
1553
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
1554
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
1456
1555
  #
1457
1556
  # @return [LogList]
1458
- def list_provider_logs(provider_id:, queries: nil)
1557
+ def list_provider_logs(provider_id:, queries: nil, total: nil)
1459
1558
  api_path = '/messaging/providers/{providerId}/logs'
1460
1559
  .gsub('{providerId}', provider_id)
1461
1560
 
@@ -1465,6 +1564,7 @@ module Appwrite
1465
1564
 
1466
1565
  api_params = {
1467
1566
  queries: queries,
1567
+ total: total,
1468
1568
  }
1469
1569
 
1470
1570
  api_headers = {
@@ -1483,9 +1583,10 @@ module Appwrite
1483
1583
  #
1484
1584
  # @param [String] subscriber_id Subscriber ID.
1485
1585
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
1586
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
1486
1587
  #
1487
1588
  # @return [LogList]
1488
- def list_subscriber_logs(subscriber_id:, queries: nil)
1589
+ def list_subscriber_logs(subscriber_id:, queries: nil, total: nil)
1489
1590
  api_path = '/messaging/subscribers/{subscriberId}/logs'
1490
1591
  .gsub('{subscriberId}', subscriber_id)
1491
1592
 
@@ -1495,6 +1596,7 @@ module Appwrite
1495
1596
 
1496
1597
  api_params = {
1497
1598
  queries: queries,
1599
+ total: total,
1498
1600
  }
1499
1601
 
1500
1602
  api_headers = {
@@ -1513,14 +1615,16 @@ module Appwrite
1513
1615
  #
1514
1616
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal
1515
1617
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
1618
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
1516
1619
  #
1517
1620
  # @return [TopicList]
1518
- def list_topics(queries: nil, search: nil)
1621
+ def list_topics(queries: nil, search: nil, total: nil)
1519
1622
  api_path = '/messaging/topics'
1520
1623
 
1521
1624
  api_params = {
1522
1625
  queries: queries,
1523
1626
  search: search,
1627
+ total: total,
1524
1628
  }
1525
1629
 
1526
1630
  api_headers = {
@@ -1667,9 +1771,10 @@ module Appwrite
1667
1771
  #
1668
1772
  # @param [String] topic_id Topic ID.
1669
1773
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
1774
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
1670
1775
  #
1671
1776
  # @return [LogList]
1672
- def list_topic_logs(topic_id:, queries: nil)
1777
+ def list_topic_logs(topic_id:, queries: nil, total: nil)
1673
1778
  api_path = '/messaging/topics/{topicId}/logs'
1674
1779
  .gsub('{topicId}', topic_id)
1675
1780
 
@@ -1679,6 +1784,7 @@ module Appwrite
1679
1784
 
1680
1785
  api_params = {
1681
1786
  queries: queries,
1787
+ total: total,
1682
1788
  }
1683
1789
 
1684
1790
  api_headers = {
@@ -1698,9 +1804,10 @@ module Appwrite
1698
1804
  # @param [String] topic_id Topic ID. The topic ID subscribed to.
1699
1805
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled
1700
1806
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
1807
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
1701
1808
  #
1702
1809
  # @return [SubscriberList]
1703
- def list_subscribers(topic_id:, queries: nil, search: nil)
1810
+ def list_subscribers(topic_id:, queries: nil, search: nil, total: nil)
1704
1811
  api_path = '/messaging/topics/{topicId}/subscribers'
1705
1812
  .gsub('{topicId}', topic_id)
1706
1813
 
@@ -1711,6 +1818,7 @@ module Appwrite
1711
1818
  api_params = {
1712
1819
  queries: queries,
1713
1820
  search: search,
1821
+ total: total,
1714
1822
  }
1715
1823
 
1716
1824
  api_headers = {
@@ -12,14 +12,16 @@ module Appwrite
12
12
  #
13
13
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId
14
14
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
15
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
15
16
  #
16
17
  # @return [SiteList]
17
- def list(queries: nil, search: nil)
18
+ def list(queries: nil, search: nil, total: nil)
18
19
  api_path = '/sites'
19
20
 
20
21
  api_params = {
21
22
  queries: queries,
22
23
  search: search,
24
+ total: total,
23
25
  }
24
26
 
25
27
  api_headers = {
@@ -323,9 +325,10 @@ module Appwrite
323
325
  # @param [String] site_id Site ID.
324
326
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type
325
327
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
328
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
326
329
  #
327
330
  # @return [DeploymentList]
328
- def list_deployments(site_id:, queries: nil, search: nil)
331
+ def list_deployments(site_id:, queries: nil, search: nil, total: nil)
329
332
  api_path = '/sites/{siteId}/deployments'
330
333
  .gsub('{siteId}', site_id)
331
334
 
@@ -336,6 +339,7 @@ module Appwrite
336
339
  api_params = {
337
340
  queries: queries,
338
341
  search: search,
342
+ total: total,
339
343
  }
340
344
 
341
345
  api_headers = {
@@ -696,9 +700,10 @@ module Appwrite
696
700
  #
697
701
  # @param [String] site_id Site ID.
698
702
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
703
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
699
704
  #
700
705
  # @return [ExecutionList]
701
- def list_logs(site_id:, queries: nil)
706
+ def list_logs(site_id:, queries: nil, total: nil)
702
707
  api_path = '/sites/{siteId}/logs'
703
708
  .gsub('{siteId}', site_id)
704
709
 
@@ -708,6 +713,7 @@ module Appwrite
708
713
 
709
714
  api_params = {
710
715
  queries: queries,
716
+ total: total,
711
717
  }
712
718
 
713
719
  api_headers = {
@@ -12,14 +12,16 @@ module Appwrite
12
12
  #
13
13
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus
14
14
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
15
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
15
16
  #
16
17
  # @return [BucketList]
17
- def list_buckets(queries: nil, search: nil)
18
+ def list_buckets(queries: nil, search: nil, total: nil)
18
19
  api_path = '/storage/buckets'
19
20
 
20
21
  api_params = {
21
22
  queries: queries,
22
23
  search: search,
24
+ total: total,
23
25
  }
24
26
 
25
27
  api_headers = {
@@ -199,9 +201,10 @@ module Appwrite
199
201
  # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
200
202
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded
201
203
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
204
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
202
205
  #
203
206
  # @return [FileList]
204
- def list_files(bucket_id:, queries: nil, search: nil)
207
+ def list_files(bucket_id:, queries: nil, search: nil, total: nil)
205
208
  api_path = '/storage/buckets/{bucketId}/files'
206
209
  .gsub('{bucketId}', bucket_id)
207
210
 
@@ -212,6 +215,7 @@ module Appwrite
212
215
  api_params = {
213
216
  queries: queries,
214
217
  search: search,
218
+ total: total,
215
219
  }
216
220
 
217
221
  api_headers = {