@revenexx/sdk 0.0.4 → 0.0.6

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.
Files changed (99) hide show
  1. package/dist/cjs/sdk.js +13491 -6163
  2. package/dist/cjs/sdk.js.map +1 -1
  3. package/dist/esm/sdk.js +13464 -6162
  4. package/dist/esm/sdk.js.map +1 -1
  5. package/dist/iife/sdk.js +13491 -6163
  6. package/package.json +1 -1
  7. package/src/client.ts +1 -1
  8. package/src/enums/address-type.ts +4 -0
  9. package/src/enums/cart-export-format.ts +4 -0
  10. package/src/enums/cart-io-apply-mode.ts +5 -0
  11. package/src/enums/cart-io-direction.ts +4 -0
  12. package/src/enums/cart-io-entity.ts +4 -0
  13. package/src/enums/cart-io-format.ts +4 -0
  14. package/src/enums/cart-item-type.ts +5 -0
  15. package/src/enums/channel-status.ts +4 -0
  16. package/src/enums/channel-type.ts +7 -0
  17. package/src/enums/contact-role.ts +6 -0
  18. package/src/enums/contact-status.ts +5 -0
  19. package/src/enums/location-type.ts +6 -0
  20. package/src/enums/market-status.ts +4 -0
  21. package/src/enums/order-comment-visibility.ts +4 -0
  22. package/src/enums/order-item-type.ts +5 -0
  23. package/src/enums/order-list-kind.ts +4 -0
  24. package/src/enums/order-payment-status.ts +9 -0
  25. package/src/enums/organization-status.ts +4 -0
  26. package/src/enums/page-status.ts +5 -0
  27. package/src/enums/payment-fee-type.ts +5 -0
  28. package/src/enums/payment-method-kind.ts +4 -0
  29. package/src/enums/price-entry-type.ts +4 -0
  30. package/src/enums/price-list-status.ts +4 -0
  31. package/src/enums/shipping-method-matrix-basis.ts +6 -0
  32. package/src/enums/shipping-method-pricing-type.ts +5 -0
  33. package/src/enums/store-asset-request-visibility.ts +4 -0
  34. package/src/enums/visibility.ts +4 -0
  35. package/src/index.ts +28 -2
  36. package/src/models.ts +5309 -1009
  37. package/src/services/apps.ts +154 -154
  38. package/src/services/avatars.ts +57 -57
  39. package/src/services/carts.ts +739 -104
  40. package/src/services/channels.ts +147 -19
  41. package/src/services/customers.ts +809 -69
  42. package/src/services/greetings.ts +18 -18
  43. package/src/services/inventories.ts +620 -65
  44. package/src/services/locale.ts +16 -16
  45. package/src/services/markets.ts +690 -75
  46. package/src/services/messaging.ts +273 -273
  47. package/src/services/orderlists.ts +889 -0
  48. package/src/services/orders.ts +692 -137
  49. package/src/services/pages.ts +661 -155
  50. package/src/services/payments.ts +591 -64
  51. package/src/services/prices.ts +585 -59
  52. package/src/services/products.ts +1908 -272
  53. package/src/services/search.ts +24 -24
  54. package/src/services/shipping.ts +451 -59
  55. package/src/services/sites.ts +116 -116
  56. package/src/services/storage.ts +933 -599
  57. package/src/services/tokens.ts +14 -14
  58. package/types/enums/address-type.d.ts +4 -0
  59. package/types/enums/cart-export-format.d.ts +4 -0
  60. package/types/enums/cart-io-apply-mode.d.ts +5 -0
  61. package/types/enums/cart-io-direction.d.ts +4 -0
  62. package/types/enums/cart-io-entity.d.ts +4 -0
  63. package/types/enums/cart-io-format.d.ts +4 -0
  64. package/types/enums/cart-item-type.d.ts +5 -0
  65. package/types/enums/channel-status.d.ts +4 -0
  66. package/types/enums/channel-type.d.ts +7 -0
  67. package/types/enums/contact-role.d.ts +6 -0
  68. package/types/enums/contact-status.d.ts +5 -0
  69. package/types/enums/location-type.d.ts +6 -0
  70. package/types/enums/market-status.d.ts +4 -0
  71. package/types/enums/order-comment-visibility.d.ts +4 -0
  72. package/types/enums/order-item-type.d.ts +5 -0
  73. package/types/enums/order-list-kind.d.ts +4 -0
  74. package/types/enums/order-payment-status.d.ts +9 -0
  75. package/types/enums/organization-status.d.ts +4 -0
  76. package/types/enums/page-status.d.ts +5 -0
  77. package/types/enums/payment-fee-type.d.ts +5 -0
  78. package/types/enums/payment-method-kind.d.ts +4 -0
  79. package/types/enums/price-entry-type.d.ts +4 -0
  80. package/types/enums/price-list-status.d.ts +4 -0
  81. package/types/enums/shipping-method-matrix-basis.d.ts +6 -0
  82. package/types/enums/shipping-method-pricing-type.d.ts +5 -0
  83. package/types/enums/store-asset-request-visibility.d.ts +4 -0
  84. package/types/enums/visibility.d.ts +4 -0
  85. package/types/index.d.ts +28 -2
  86. package/types/models.d.ts +5170 -1010
  87. package/types/services/carts.d.ts +271 -12
  88. package/types/services/channels.d.ts +54 -2
  89. package/types/services/customers.d.ts +298 -12
  90. package/types/services/inventories.d.ts +225 -11
  91. package/types/services/markets.d.ts +235 -6
  92. package/types/services/orderlists.d.ts +324 -0
  93. package/types/services/orders.d.ts +238 -16
  94. package/types/services/pages.d.ts +190 -6
  95. package/types/services/payments.d.ts +221 -7
  96. package/types/services/prices.d.ts +218 -6
  97. package/types/services/products.d.ts +672 -32
  98. package/types/services/shipping.d.ts +168 -6
  99. package/types/services/storage.d.ts +353 -285
@@ -1,421 +1,489 @@
1
1
  import { Client, UploadProgress } from '../client';
2
- import type { Models } from '../models';
3
- import { Compression } from '../enums/compression';
4
- import { Gravity } from '../enums/gravity';
5
- import { Output } from '../enums/output';
2
+ import { Visibility } from '../enums/visibility';
6
3
  export declare class Storage {
7
4
  client: Client;
8
5
  constructor(client: Client);
9
6
  /**
10
- * Get a list of all the storage buckets. You can use the query params to filter your results.
11
7
  *
12
- * @param {string[]} params.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, transformations
13
- * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
14
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
8
+ * @param {string} params.search -
15
9
  * @throws {RevenexxException}
16
- * @returns {Promise<Models.BucketList>}
10
+ * @returns {Promise<{}>}
17
11
  */
18
- storageListBuckets(params?: {
19
- queries?: string[];
12
+ assetIndex(params?: {
20
13
  search?: string;
21
- total?: boolean;
22
- }): Promise<Models.BucketList>;
14
+ }): Promise<{}>;
23
15
  /**
24
- * Get a list of all the storage buckets. You can use the query params to filter your results.
25
16
  *
26
- * @param {string[]} 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, transformations
27
- * @param {string} search - Search term to filter your list results. Max length: 256 chars.
28
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
17
+ * @param {string} search -
29
18
  * @throws {RevenexxException}
30
- * @returns {Promise<Models.BucketList>}
19
+ * @returns {Promise<{}>}
31
20
  * @deprecated Use the object parameter style method for a better developer experience.
32
21
  */
33
- storageListBuckets(queries?: string[], search?: string, total?: boolean): Promise<Models.BucketList>;
22
+ assetIndex(search?: string): Promise<{}>;
34
23
  /**
35
- * Create a new storage bucket.
36
24
  *
37
- * @param {string} params.bucketId - Unique 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.
38
- * @param {string} params.name - Bucket name
39
- * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
40
- * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
41
- * @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
42
- * @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
43
- * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
44
- * @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
45
- * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 30MB.
46
- * @param {string[]} params.permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
47
- * @param {boolean} params.transformations - Are image transformations enabled?
25
+ * @param {string} params.file -
26
+ * @param {string} params.altText -
27
+ * @param {string} params.description -
28
+ * @param {string} params.displayName -
29
+ * @param {string} params.folderId -
30
+ * @param {boolean} params.keepArchive -
31
+ * @param {string[]} params.tags -
32
+ * @param {boolean} params.unpack - Archives only: unpack the members after upload (see AssetController).
33
+ * @param {Visibility} params.visibility -
48
34
  * @throws {RevenexxException}
49
- * @returns {Promise<Models.Bucket>}
35
+ * @returns {Promise<{}>}
50
36
  */
51
- storageCreateBucket(params: {
52
- bucketId: string;
53
- name: string;
54
- allowedFileExtensions?: string[];
55
- antivirus?: boolean;
56
- compression?: Compression;
57
- enabled?: boolean;
58
- encryption?: boolean;
59
- fileSecurity?: boolean;
60
- maximumFileSize?: number;
61
- permissions?: string[];
62
- transformations?: boolean;
63
- }): Promise<Models.Bucket>;
64
- /**
65
- * Create a new storage bucket.
66
- *
67
- * @param {string} bucketId - Unique 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.
68
- * @param {string} name - Bucket name
69
- * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
70
- * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
71
- * @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
72
- * @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
73
- * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
74
- * @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
75
- * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 30MB.
76
- * @param {string[]} permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
77
- * @param {boolean} transformations - Are image transformations enabled?
78
- * @throws {RevenexxException}
79
- * @returns {Promise<Models.Bucket>}
37
+ assetStore(params: {
38
+ file: string;
39
+ altText?: string;
40
+ description?: string;
41
+ displayName?: string;
42
+ folderId?: string;
43
+ keepArchive?: boolean;
44
+ tags?: string[];
45
+ unpack?: boolean;
46
+ visibility?: Visibility;
47
+ onProgress?: (progress: UploadProgress) => void;
48
+ }): Promise<{}>;
49
+ /**
50
+ *
51
+ * @param {string} file -
52
+ * @param {string} altText -
53
+ * @param {string} description -
54
+ * @param {string} displayName -
55
+ * @param {string} folderId -
56
+ * @param {boolean} keepArchive -
57
+ * @param {string[]} tags -
58
+ * @param {boolean} unpack - Archives only: unpack the members after upload (see AssetController).
59
+ * @param {Visibility} visibility -
60
+ * @throws {RevenexxException}
61
+ * @returns {Promise<{}>}
80
62
  * @deprecated Use the object parameter style method for a better developer experience.
81
63
  */
82
- storageCreateBucket(bucketId: string, name: string, allowedFileExtensions?: string[], antivirus?: boolean, compression?: Compression, enabled?: boolean, encryption?: boolean, fileSecurity?: boolean, maximumFileSize?: number, permissions?: string[], transformations?: boolean): Promise<Models.Bucket>;
64
+ assetStore(file: string, altText?: string, description?: string, displayName?: string, folderId?: string, keepArchive?: boolean, tags?: string[], unpack?: boolean, visibility?: Visibility, onProgress?: (progress: UploadProgress) => void): Promise<{}>;
83
65
  /**
84
- * Delete a storage bucket by its unique ID.
85
66
  *
86
- * @param {string} params.bucketId - Bucket unique ID.
67
+ * @param {string} params.folderId -
68
+ * @param {string} params.visibility -
87
69
  * @throws {RevenexxException}
88
70
  * @returns {Promise<{}>}
89
71
  */
90
- storageDeleteBucket(params: {
91
- bucketId: string;
72
+ assetBulk(params?: {
73
+ folderId?: string;
74
+ visibility?: string;
92
75
  }): Promise<{}>;
93
76
  /**
94
- * Delete a storage bucket by its unique ID.
95
77
  *
96
- * @param {string} bucketId - Bucket unique ID.
78
+ * @param {string} folderId -
79
+ * @param {string} visibility -
97
80
  * @throws {RevenexxException}
98
81
  * @returns {Promise<{}>}
99
82
  * @deprecated Use the object parameter style method for a better developer experience.
100
83
  */
101
- storageDeleteBucket(bucketId: string): Promise<{}>;
84
+ assetBulk(folderId?: string, visibility?: string): Promise<{}>;
102
85
  /**
103
- * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.
104
86
  *
105
- * @param {string} params.bucketId - Bucket unique ID.
87
+ * @param {string} params.id -
106
88
  * @throws {RevenexxException}
107
- * @returns {Promise<Models.Bucket>}
89
+ * @returns {Promise<{}>}
108
90
  */
109
- storageGetBucket(params: {
110
- bucketId: string;
111
- }): Promise<Models.Bucket>;
91
+ assetDestroy(params: {
92
+ id: string;
93
+ }): Promise<{}>;
112
94
  /**
113
- * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.
114
95
  *
115
- * @param {string} bucketId - Bucket unique ID.
96
+ * @param {string} id -
116
97
  * @throws {RevenexxException}
117
- * @returns {Promise<Models.Bucket>}
98
+ * @returns {Promise<{}>}
118
99
  * @deprecated Use the object parameter style method for a better developer experience.
119
100
  */
120
- storageGetBucket(bucketId: string): Promise<Models.Bucket>;
101
+ assetDestroy(id: string): Promise<{}>;
121
102
  /**
122
- * Update a storage bucket by its unique ID.
123
103
  *
124
- * @param {string} params.bucketId - Bucket unique ID.
125
- * @param {string} params.name - Bucket name
126
- * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
127
- * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
128
- * @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
129
- * @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
130
- * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
131
- * @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
132
- * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 30MB.
133
- * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
134
- * @param {boolean} params.transformations - Are image transformations enabled?
104
+ * @param {string} params.id -
135
105
  * @throws {RevenexxException}
136
- * @returns {Promise<Models.Bucket>}
106
+ * @returns {Promise<{}>}
137
107
  */
138
- storageUpdateBucket(params: {
139
- bucketId: string;
140
- name: string;
141
- allowedFileExtensions?: string[];
142
- antivirus?: boolean;
143
- compression?: Compression;
144
- enabled?: boolean;
145
- encryption?: boolean;
146
- fileSecurity?: boolean;
147
- maximumFileSize?: number;
148
- permissions?: string[];
149
- transformations?: boolean;
150
- }): Promise<Models.Bucket>;
151
- /**
152
- * Update a storage bucket by its unique ID.
153
- *
154
- * @param {string} bucketId - Bucket unique ID.
155
- * @param {string} name - Bucket name
156
- * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
157
- * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
158
- * @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
159
- * @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
160
- * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
161
- * @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
162
- * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 30MB.
163
- * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
164
- * @param {boolean} transformations - Are image transformations enabled?
165
- * @throws {RevenexxException}
166
- * @returns {Promise<Models.Bucket>}
108
+ assetShow(params: {
109
+ id: string;
110
+ }): Promise<{}>;
111
+ /**
112
+ *
113
+ * @param {string} id -
114
+ * @throws {RevenexxException}
115
+ * @returns {Promise<{}>}
167
116
  * @deprecated Use the object parameter style method for a better developer experience.
168
117
  */
169
- storageUpdateBucket(bucketId: string, name: string, allowedFileExtensions?: string[], antivirus?: boolean, compression?: Compression, enabled?: boolean, encryption?: boolean, fileSecurity?: boolean, maximumFileSize?: number, permissions?: string[], transformations?: boolean): Promise<Models.Bucket>;
118
+ assetShow(id: string): Promise<{}>;
170
119
  /**
171
- * Get a list of all the user files. You can use the query params to filter your results.
172
120
  *
173
- * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
174
- * @param {string[]} params.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
175
- * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
176
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
121
+ * @param {string} params.id -
122
+ * @param {string} params.altText -
123
+ * @param {string} params.description -
124
+ * @param {string} params.displayName -
125
+ * @param {string} params.folderId -
126
+ * @param {string} params.name -
127
+ * @param {string[]} params.tags -
128
+ * @param {Visibility} params.visibility -
177
129
  * @throws {RevenexxException}
178
- * @returns {Promise<Models.FileList>}
130
+ * @returns {Promise<{}>}
179
131
  */
180
- storageListFiles(params: {
181
- bucketId: string;
182
- queries?: string[];
183
- search?: string;
184
- total?: boolean;
185
- }): Promise<Models.FileList>;
132
+ assetUpdate(params: {
133
+ id: string;
134
+ altText?: string;
135
+ description?: string;
136
+ displayName?: string;
137
+ folderId?: string;
138
+ name?: string;
139
+ tags?: string[];
140
+ visibility?: Visibility;
141
+ }): Promise<{}>;
186
142
  /**
187
- * Get a list of all the user files. You can use the query params to filter your results.
188
143
  *
189
- * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
190
- * @param {string[]} 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
191
- * @param {string} search - Search term to filter your list results. Max length: 256 chars.
192
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
144
+ * @param {string} id -
145
+ * @param {string} altText -
146
+ * @param {string} description -
147
+ * @param {string} displayName -
148
+ * @param {string} folderId -
149
+ * @param {string} name -
150
+ * @param {string[]} tags -
151
+ * @param {Visibility} visibility -
193
152
  * @throws {RevenexxException}
194
- * @returns {Promise<Models.FileList>}
153
+ * @returns {Promise<{}>}
195
154
  * @deprecated Use the object parameter style method for a better developer experience.
196
155
  */
197
- storageListFiles(bucketId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.FileList>;
156
+ assetUpdate(id: string, altText?: string, description?: string, displayName?: string, folderId?: string, name?: string, tags?: string[], visibility?: Visibility): Promise<{}>;
198
157
  /**
199
- * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://app.revenexx.com/docs/server/storage#storageCreateBucket) API or directly from your Revenexx console.
200
158
  *
201
- * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.
159
+ * @param {string} params.id -
160
+ * @throws {RevenexxException}
161
+ * @returns {Promise<{}>}
162
+ */
163
+ assetDownload(params: {
164
+ id: string;
165
+ }): Promise<{}>;
166
+ /**
202
167
  *
203
- * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-revenexx-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.
168
+ * @param {string} id -
169
+ * @throws {RevenexxException}
170
+ * @returns {Promise<{}>}
171
+ * @deprecated Use the object parameter style method for a better developer experience.
172
+ */
173
+ assetDownload(id: string): Promise<{}>;
174
+ /**
204
175
  *
205
- * If you're creating a new file using one of the Revenexx SDKs, all the chunking logic will be managed by the SDK internally.
176
+ * @param {string} params.id -
177
+ * @throws {RevenexxException}
178
+ * @returns {Promise<{}>}
179
+ */
180
+ assetPermanent(params: {
181
+ id: string;
182
+ }): Promise<{}>;
183
+ /**
206
184
  *
185
+ * @param {string} id -
186
+ * @throws {RevenexxException}
187
+ * @returns {Promise<{}>}
188
+ * @deprecated Use the object parameter style method for a better developer experience.
189
+ */
190
+ assetPermanent(id: string): Promise<{}>;
191
+ /**
207
192
  *
208
- * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
209
- * @param {string} params.file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).
210
- * @param {string} params.fileId - File 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.
211
- * @param {string[]} params.permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
193
+ * @param {string} params.id -
212
194
  * @throws {RevenexxException}
213
- * @returns {Promise<Models.File>}
195
+ * @returns {Promise<{}>}
214
196
  */
215
- storageCreateFile(params: {
216
- bucketId: string;
217
- file: string;
218
- fileId: string;
219
- permissions?: string[];
220
- onProgress?: (progress: UploadProgress) => void;
221
- }): Promise<Models.File>;
197
+ assetReprocess(params: {
198
+ id: string;
199
+ }): Promise<{}>;
222
200
  /**
223
- * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://app.revenexx.com/docs/server/storage#storageCreateBucket) API or directly from your Revenexx console.
224
201
  *
225
- * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.
202
+ * @param {string} id -
203
+ * @throws {RevenexxException}
204
+ * @returns {Promise<{}>}
205
+ * @deprecated Use the object parameter style method for a better developer experience.
206
+ */
207
+ assetReprocess(id: string): Promise<{}>;
208
+ /**
226
209
  *
227
- * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-revenexx-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.
210
+ * @param {string} params.id -
211
+ * @throws {RevenexxException}
212
+ * @returns {Promise<{}>}
213
+ */
214
+ assetRestore(params: {
215
+ id: string;
216
+ }): Promise<{}>;
217
+ /**
228
218
  *
229
- * If you're creating a new file using one of the Revenexx SDKs, all the chunking logic will be managed by the SDK internally.
219
+ * @param {string} id -
220
+ * @throws {RevenexxException}
221
+ * @returns {Promise<{}>}
222
+ * @deprecated Use the object parameter style method for a better developer experience.
223
+ */
224
+ assetRestore(id: string): Promise<{}>;
225
+ /**
230
226
  *
227
+ * @param {string} params.id -
228
+ * @param {number} params.ttlSeconds -
229
+ * @throws {RevenexxException}
230
+ * @returns {Promise<{}>}
231
+ */
232
+ assetSign(params: {
233
+ id: string;
234
+ ttlSeconds?: number;
235
+ }): Promise<{}>;
236
+ /**
231
237
  *
232
- * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
233
- * @param {string} file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).
234
- * @param {string} fileId - File 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.
235
- * @param {string[]} permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
238
+ * @param {string} id -
239
+ * @param {number} ttlSeconds -
236
240
  * @throws {RevenexxException}
237
- * @returns {Promise<Models.File>}
241
+ * @returns {Promise<{}>}
238
242
  * @deprecated Use the object parameter style method for a better developer experience.
239
243
  */
240
- storageCreateFile(bucketId: string, file: string, fileId: string, permissions?: string[], onProgress?: (progress: UploadProgress) => void): Promise<Models.File>;
244
+ assetSign(id: string, ttlSeconds?: number): Promise<{}>;
241
245
  /**
242
- * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.
243
246
  *
244
- * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
245
- * @param {string} params.fileId - File ID.
247
+ * @param {string} params.id -
248
+ * @param {boolean} params.keepArchive -
249
+ * @param {string} params.targetFolderId -
246
250
  * @throws {RevenexxException}
247
251
  * @returns {Promise<{}>}
248
252
  */
249
- storageDeleteFile(params: {
250
- bucketId: string;
251
- fileId: string;
253
+ assetUnpack(params: {
254
+ id: string;
255
+ keepArchive?: boolean;
256
+ targetFolderId?: string;
252
257
  }): Promise<{}>;
253
258
  /**
254
- * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.
255
259
  *
256
- * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
257
- * @param {string} fileId - File ID.
260
+ * @param {string} id -
261
+ * @param {boolean} keepArchive -
262
+ * @param {string} targetFolderId -
258
263
  * @throws {RevenexxException}
259
264
  * @returns {Promise<{}>}
260
265
  * @deprecated Use the object parameter style method for a better developer experience.
261
266
  */
262
- storageDeleteFile(bucketId: string, fileId: string): Promise<{}>;
267
+ assetUnpack(id: string, keepArchive?: boolean, targetFolderId?: string): Promise<{}>;
263
268
  /**
264
- * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.
265
269
  *
266
- * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
267
- * @param {string} params.fileId - File ID.
268
270
  * @throws {RevenexxException}
269
- * @returns {Promise<Models.File>}
271
+ * @returns {Promise<{}>}
270
272
  */
271
- storageGetFile(params: {
272
- bucketId: string;
273
- fileId: string;
274
- }): Promise<Models.File>;
273
+ folderIndex(): Promise<{}>;
275
274
  /**
276
- * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.
277
275
  *
278
- * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
279
- * @param {string} fileId - File ID.
276
+ * @param {string} params.name -
277
+ * @param {string} params.parentId -
280
278
  * @throws {RevenexxException}
281
- * @returns {Promise<Models.File>}
279
+ * @returns {Promise<{}>}
280
+ */
281
+ folderStore(params: {
282
+ name: string;
283
+ parentId?: string;
284
+ }): Promise<{}>;
285
+ /**
286
+ *
287
+ * @param {string} name -
288
+ * @param {string} parentId -
289
+ * @throws {RevenexxException}
290
+ * @returns {Promise<{}>}
282
291
  * @deprecated Use the object parameter style method for a better developer experience.
283
292
  */
284
- storageGetFile(bucketId: string, fileId: string): Promise<Models.File>;
293
+ folderStore(name: string, parentId?: string): Promise<{}>;
285
294
  /**
286
- * Update a file by its unique ID. Only users with write permissions have access to update this resource.
287
295
  *
288
- * @param {string} params.bucketId - Bucket unique ID.
289
- * @param {string} params.fileId - File ID.
290
- * @param {string} params.name - File name.
291
- * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
296
+ * @param {string} params.id -
297
+ * @param {boolean} params.recursive -
292
298
  * @throws {RevenexxException}
293
- * @returns {Promise<Models.File>}
299
+ * @returns {Promise<{}>}
294
300
  */
295
- storageUpdateFile(params: {
296
- bucketId: string;
297
- fileId: string;
301
+ folderDestroy(params: {
302
+ id: string;
303
+ recursive?: boolean;
304
+ }): Promise<{}>;
305
+ /**
306
+ *
307
+ * @param {string} id -
308
+ * @param {boolean} recursive -
309
+ * @throws {RevenexxException}
310
+ * @returns {Promise<{}>}
311
+ * @deprecated Use the object parameter style method for a better developer experience.
312
+ */
313
+ folderDestroy(id: string, recursive?: boolean): Promise<{}>;
314
+ /**
315
+ *
316
+ * @param {string} params.id -
317
+ * @throws {RevenexxException}
318
+ * @returns {Promise<{}>}
319
+ */
320
+ folderShow(params: {
321
+ id: string;
322
+ }): Promise<{}>;
323
+ /**
324
+ *
325
+ * @param {string} id -
326
+ * @throws {RevenexxException}
327
+ * @returns {Promise<{}>}
328
+ * @deprecated Use the object parameter style method for a better developer experience.
329
+ */
330
+ folderShow(id: string): Promise<{}>;
331
+ /**
332
+ *
333
+ * @param {string} params.id -
334
+ * @param {string} params.name -
335
+ * @param {string} params.parentId -
336
+ * @throws {RevenexxException}
337
+ * @returns {Promise<{}>}
338
+ */
339
+ folderUpdate(params: {
340
+ id: string;
298
341
  name?: string;
299
- permissions?: string[];
300
- }): Promise<Models.File>;
342
+ parentId?: string;
343
+ }): Promise<{}>;
344
+ /**
345
+ *
346
+ * @param {string} id -
347
+ * @param {string} name -
348
+ * @param {string} parentId -
349
+ * @throws {RevenexxException}
350
+ * @returns {Promise<{}>}
351
+ * @deprecated Use the object parameter style method for a better developer experience.
352
+ */
353
+ folderUpdate(id: string, name?: string, parentId?: string): Promise<{}>;
354
+ /**
355
+ *
356
+ * @throws {RevenexxException}
357
+ * @returns {Promise<{}>}
358
+ */
359
+ syncRuleIndex(): Promise<{}>;
360
+ /**
361
+ *
362
+ * @throws {RevenexxException}
363
+ * @returns {Promise<{}>}
364
+ */
365
+ syncRuleStore(): Promise<{}>;
366
+ /**
367
+ *
368
+ * @param {string} params.id -
369
+ * @throws {RevenexxException}
370
+ * @returns {Promise<{}>}
371
+ */
372
+ syncRuleDestroy(params: {
373
+ id: string;
374
+ }): Promise<{}>;
375
+ /**
376
+ *
377
+ * @param {string} id -
378
+ * @throws {RevenexxException}
379
+ * @returns {Promise<{}>}
380
+ * @deprecated Use the object parameter style method for a better developer experience.
381
+ */
382
+ syncRuleDestroy(id: string): Promise<{}>;
383
+ /**
384
+ *
385
+ * @param {string} params.id -
386
+ * @throws {RevenexxException}
387
+ * @returns {Promise<{}>}
388
+ */
389
+ syncRuleShow(params: {
390
+ id: string;
391
+ }): Promise<{}>;
392
+ /**
393
+ *
394
+ * @param {string} id -
395
+ * @throws {RevenexxException}
396
+ * @returns {Promise<{}>}
397
+ * @deprecated Use the object parameter style method for a better developer experience.
398
+ */
399
+ syncRuleShow(id: string): Promise<{}>;
400
+ /**
401
+ *
402
+ * @param {string} params.id -
403
+ * @throws {RevenexxException}
404
+ * @returns {Promise<{}>}
405
+ */
406
+ syncRuleUpdate(params: {
407
+ id: string;
408
+ }): Promise<{}>;
301
409
  /**
302
- * Update a file by its unique ID. Only users with write permissions have access to update this resource.
303
410
  *
304
- * @param {string} bucketId - Bucket unique ID.
305
- * @param {string} fileId - File ID.
306
- * @param {string} name - File name.
307
- * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
411
+ * @param {string} id -
308
412
  * @throws {RevenexxException}
309
- * @returns {Promise<Models.File>}
413
+ * @returns {Promise<{}>}
310
414
  * @deprecated Use the object parameter style method for a better developer experience.
311
415
  */
312
- storageUpdateFile(bucketId: string, fileId: string, name?: string, permissions?: string[]): Promise<Models.File>;
416
+ syncRuleUpdate(id: string): Promise<{}>;
313
417
  /**
314
- * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
315
418
  *
316
- * @param {string} params.bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
317
- * @param {string} params.fileId - File ID.
318
- * @param {string} params.token - File token for accessing this file.
419
+ * @param {string} params.id -
319
420
  * @throws {RevenexxException}
320
421
  * @returns {Promise<{}>}
321
422
  */
322
- storageGetFileDownload(params: {
323
- bucketId: string;
324
- fileId: string;
325
- token?: string;
423
+ syncRuleRun(params: {
424
+ id: string;
326
425
  }): Promise<{}>;
327
426
  /**
328
- * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
329
427
  *
330
- * @param {string} bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
331
- * @param {string} fileId - File ID.
332
- * @param {string} token - File token for accessing this file.
428
+ * @param {string} id -
333
429
  * @throws {RevenexxException}
334
430
  * @returns {Promise<{}>}
335
431
  * @deprecated Use the object parameter style method for a better developer experience.
336
432
  */
337
- storageGetFileDownload(bucketId: string, fileId: string, token?: string): Promise<{}>;
338
- /**
339
- * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.
340
- *
341
- * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
342
- * @param {string} params.fileId - File ID
343
- * @param {number} params.width - Resize preview image width, Pass an integer between 0 to 4000.
344
- * @param {number} params.height - Resize preview image height, Pass an integer between 0 to 4000.
345
- * @param {Gravity} params.gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right
346
- * @param {number} params.quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
347
- * @param {number} params.borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
348
- * @param {string} params.borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.
349
- * @param {number} params.borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.
350
- * @param {number} params.opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.
351
- * @param {number} params.rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.
352
- * @param {string} params.background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.
353
- * @param {Output} params.output - Output format type (jpeg, jpg, png, gif and webp).
354
- * @param {string} params.token - File token for accessing this file.
355
- * @throws {RevenexxException}
356
- * @returns {Promise<{}>}
357
- */
358
- storageGetFilePreview(params: {
359
- bucketId: string;
360
- fileId: string;
361
- width?: number;
362
- height?: number;
363
- gravity?: Gravity;
364
- quality?: number;
365
- borderWidth?: number;
366
- borderColor?: string;
367
- borderRadius?: number;
368
- opacity?: number;
369
- rotation?: number;
370
- background?: string;
371
- output?: Output;
372
- token?: string;
433
+ syncRuleRun(id: string): Promise<{}>;
434
+ /**
435
+ *
436
+ * @param {string} params.id -
437
+ * @param {string} params.runId -
438
+ * @throws {RevenexxException}
439
+ * @returns {Promise<{}>}
440
+ */
441
+ syncRuleRunProtocol(params: {
442
+ id: string;
443
+ runId: string;
373
444
  }): Promise<{}>;
374
445
  /**
375
- * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.
376
446
  *
377
- * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
378
- * @param {string} fileId - File ID
379
- * @param {number} width - Resize preview image width, Pass an integer between 0 to 4000.
380
- * @param {number} height - Resize preview image height, Pass an integer between 0 to 4000.
381
- * @param {Gravity} gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right
382
- * @param {number} quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
383
- * @param {number} borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
384
- * @param {string} borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.
385
- * @param {number} borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.
386
- * @param {number} opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.
387
- * @param {number} rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.
388
- * @param {string} background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.
389
- * @param {Output} output - Output format type (jpeg, jpg, png, gif and webp).
390
- * @param {string} token - File token for accessing this file.
447
+ * @param {string} id -
448
+ * @param {string} runId -
391
449
  * @throws {RevenexxException}
392
450
  * @returns {Promise<{}>}
393
451
  * @deprecated Use the object parameter style method for a better developer experience.
394
452
  */
395
- storageGetFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?: Gravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: Output, token?: string): Promise<{}>;
453
+ syncRuleRunProtocol(id: string, runId: string): Promise<{}>;
396
454
  /**
397
- * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.
398
455
  *
399
- * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
400
- * @param {string} params.fileId - File ID.
401
- * @param {string} params.token - File token for accessing this file.
456
+ * @param {string} params.ruleId -
457
+ * @param {string} params.from -
458
+ * @param {string} params.to -
402
459
  * @throws {RevenexxException}
403
460
  * @returns {Promise<{}>}
404
461
  */
405
- storageGetFileView(params: {
406
- bucketId: string;
407
- fileId: string;
408
- token?: string;
462
+ syncRuleHistory(params?: {
463
+ ruleId?: string;
464
+ from?: string;
465
+ to?: string;
409
466
  }): Promise<{}>;
410
467
  /**
411
- * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.
412
468
  *
413
- * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
414
- * @param {string} fileId - File ID.
415
- * @param {string} token - File token for accessing this file.
469
+ * @param {string} ruleId -
470
+ * @param {string} from -
471
+ * @param {string} to -
416
472
  * @throws {RevenexxException}
417
473
  * @returns {Promise<{}>}
418
474
  * @deprecated Use the object parameter style method for a better developer experience.
419
475
  */
420
- storageGetFileView(bucketId: string, fileId: string, token?: string): Promise<{}>;
476
+ syncRuleHistory(ruleId?: string, from?: string, to?: string): Promise<{}>;
477
+ /**
478
+ *
479
+ * @throws {RevenexxException}
480
+ * @returns {Promise<{}>}
481
+ */
482
+ tenantStats(): Promise<{}>;
483
+ /**
484
+ *
485
+ * @throws {RevenexxException}
486
+ * @returns {Promise<{}>}
487
+ */
488
+ tenantUsage(): Promise<{}>;
421
489
  }