@@ -96,44 +96,6 @@ export class Databases extends Service {
96
96
} , payload ) ;
97
97
}
98
98
99
- /**
100
- * Create new Documents. Before using this route, you should create a new
101
- * collection resource using either a [server
102
- * integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
103
- * API or directly from your database console.
104
- *
105
- * @param {string } databaseId
106
- * @param {string } collectionId
107
- * @param {object[] } documents
108
- * @throws {AppwriteException }
109
- * @returns {Promise }
110
- */
111
- createDocuments < Document extends Models . Document > ( databaseId : string , collectionId : string , documents : object [ ] ) : Promise < Models . DocumentList < Document > > {
112
- if ( typeof databaseId === 'undefined' ) {
113
- throw new AppwriteException ( 'Missing required parameter: "databaseId"' ) ;
114
- }
115
-
116
- if ( typeof collectionId === 'undefined' ) {
117
- throw new AppwriteException ( 'Missing required parameter: "collectionId"' ) ;
118
- }
119
-
120
- if ( typeof documents === 'undefined' ) {
121
- throw new AppwriteException ( 'Missing required parameter: "documents"' ) ;
122
- }
123
-
124
- const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents' . replace ( '{databaseId}' , databaseId ) . replace ( '{collectionId}' , collectionId ) ;
125
- const payload : Payload = { } ;
126
-
127
- if ( typeof documents !== 'undefined' ) {
128
- payload [ 'documents' ] = documents ;
129
- }
130
-
131
- const uri = new URL ( this . client . config . endpoint + apiPath ) ;
132
- return this . client . call ( 'post' , uri , {
133
- 'content-type' : 'application/json' ,
134
- } , payload ) ;
135
- }
136
-
137
99
/**
138
100
* Get a document by its unique ID. This endpoint response returns a JSON
139
101
* object with the document data.
0 commit comments