Skip to content

Commit

Permalink
Updates Documentation
Browse files Browse the repository at this point in the history
This commit updates documentation for the project.
  • Loading branch information
Luidog committed Jun 17, 2019
1 parent 6c2744f commit 4460a4e
Show file tree
Hide file tree
Showing 33 changed files with 3,277 additions and 967 deletions.
720 changes: 456 additions & 264 deletions README.md

Large diffs are not rendered by default.

1,292 changes: 1,261 additions & 31 deletions docs/Agent.html

Large diffs are not rendered by default.

296 changes: 47 additions & 249 deletions docs/Client.html

Large diffs are not rendered by default.

533 changes: 517 additions & 16 deletions docs/Connection.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/Data.html

Large diffs are not rendered by default.

49 changes: 37 additions & 12 deletions docs/Session.html

Large diffs are not rendered by default.

311 changes: 308 additions & 3 deletions docs/global.html

Large diffs are not rendered by default.

120 changes: 117 additions & 3 deletions docs/global.html#Credentials

Large diffs are not rendered by default.

390 changes: 195 additions & 195 deletions docs/index.html

Large diffs are not rendered by default.

180 changes: 115 additions & 65 deletions docs/models_agent.model.js.html

Large diffs are not rendered by default.

142 changes: 76 additions & 66 deletions docs/models_client.model.js.html

Large diffs are not rendered by default.

78 changes: 69 additions & 9 deletions docs/models_connection.model.js.html

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions docs/models_credentials.model.js.html

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions docs/models_data.model.js.html

Large diffs are not rendered by default.

23 changes: 15 additions & 8 deletions docs/models_session.model.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/services_container.service.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/services_metadata.service.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/services_request.service.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/services_transform.service.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/urls.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/utilities_conversion.utilities.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/utilities_filemaker.utilities.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/utilities_urls.utilities.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/results/client-login-example.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"token": "7bd9ada3c19b8af1abce977d74bd7950bb3fdbb876a77b33c1"
"token": "5de8f916517c531c9c731a3a314fa32a7f894013af187e848b0b"
}
2 changes: 1 addition & 1 deletion examples/results/field-data-utility-example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"name": "yoda",
"image": "https://some-server.com/Streaming_SSL/MainDB/332651C476F791617118B74B1F64A731E5C6D6119F3BB4DC552AE5CF19C43E2F?RCType=EmbeddedRCFileProcessor",
"image": "https://some-server.com/Streaming_SSL/MainDB/C71488639D896C077F74F3B66EDBD818707AC6C61C283D955F0D21E25CBB2CB2?RCType=EmbeddedRCFileProcessor",
"object": "",
"array": "",
"height": "",
Expand Down
2 changes: 1 addition & 1 deletion examples/results/field-data-utility-original-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"fieldData": {
"name": "yoda",
"image": "https://some-server.com/Streaming_SSL/MainDB/4DA2FB32FD624486C5BE37662EDBAE56B448CC2F9912481EDBB08164AD38E4FF?RCType=EmbeddedRCFileProcessor",
"image": "https://some-server.com/Streaming_SSL/MainDB/9C3AF224D2F113F7C93345BAF6C64747BEBA5DEA0493C834B5B2A83ADE10B3B9?RCType=EmbeddedRCFileProcessor",
"object": "",
"array": "",
"height": "",
Expand Down
2 changes: 1 addition & 1 deletion examples/results/find-records-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"layout": "Heroes",
"table": "Heroes",
"totalRecordCount": "1977",
"foundCount": 135,
"foundCount": 136,
"returnedCount": 1
},
"data": [
Expand Down
2 changes: 1 addition & 1 deletion examples/results/get-record-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{
"fieldData": {
"name": "Yoda",
"image": "https://some-server.com/Streaming_SSL/MainDB/3366F0CD95024C7C6A52B2CA623E295B751EE52118C72CD3DAB690D6F4B2992F?RCType=EmbeddedRCFileProcessor",
"image": "https://some-server.com/Streaming_SSL/MainDB/679FE237F406D701A31A51E604DCD36780E4D7CF23A6194166F5BCC32006DE77?RCType=EmbeddedRCFileProcessor",
"object": "",
"array": "",
"height": "",
Expand Down
4 changes: 2 additions & 2 deletions examples/results/list-records-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"layout": "Heroes",
"table": "Heroes",
"totalRecordCount": "1977",
"foundCount": 35148,
"foundCount": 35994,
"returnedCount": 2
},
"data": [
{
"fieldData": {
"name": "George Lucas",
"image": "https://some-server.com/Streaming_SSL/MainDB/3D843169A9D86D5BD59B9B67BC69A466199772613B88C7F04F426866429DDA31.png?RCType=EmbeddedRCFileProcessor",
"image": "https://some-server.com/Streaming_SSL/MainDB/22447C0F5DD40C304A5A052445CA686B06940B7C9674825ABA2A44F43981D902.png?RCType=EmbeddedRCFileProcessor",
"object": "",
"array": "",
"height": "",
Expand Down
4 changes: 2 additions & 2 deletions examples/results/record-id-utility-example.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
"751329",
"751394"
"751398",
"751465"
]
2 changes: 1 addition & 1 deletion examples/results/record-id-utility-original-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"fieldData": {
"name": "yoda",
"image": "https://some-server.com/Streaming_SSL/MainDB/D6E066BD0912B601DEA2E21D7FFEC768EAACD3949D6C71FD49F8FFEBA0DBC511?RCType=EmbeddedRCFileProcessor",
"image": "https://some-server.com/Streaming_SSL/MainDB/8EF2E93CD508D8892C8A771608537BB2B9D20A0546B55F78FDBE4394EF6FFA0C?RCType=EmbeddedRCFileProcessor",
"object": "",
"array": "",
"height": "",
Expand Down
26 changes: 22 additions & 4 deletions src/models/agent.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ class Agent extends EmbeddedDocument {

globalize(protocol, agent) {
if (!this.global) this.global = uuidv4();
/**
* @global
*/
global.FMS_API_CLIENT.AGENTS[this.global] =
protocol === 'https'
? {
Expand Down Expand Up @@ -324,6 +327,20 @@ class Agent extends EmbeddedDocument {
}
}

/**
* @method mutate
* @private
* @memberof Agent
* @description This method is used to modify keys in an object. This method is used by the watch and resolve methods to
* allow request data to be written to the datastore.
* @see {@link Agent#resolve}
* @see {@link Agent#watch}
* @see {@link Conversion Utilities#deepMapKeys}
* @param {Object} request The agent request object.
* @param {Function} mutation The function to upon each key in the request.
* @return {Object} This mutated request
*/

mutate(request, mutation) {
let {
transformRequest,
Expand Down Expand Up @@ -427,12 +444,13 @@ class Agent extends EmbeddedDocument {
*/

resolve() {
let { resolve, request } = this.pending.shift();

resolve(
let pending = this.pending.shift();
pending.resolve(
Object.assign(
this.connection.authentication(
this.mutate(request, (value, key) => key.replace(/{{dot}}/g, '.'))
this.mutate(pending.request, (value, key) =>
key.replace(/{{dot}}/g, '.')
)
),
_.isEmpty(this.agent) ? {} : this.localize()
)
Expand Down
2 changes: 1 addition & 1 deletion src/models/client.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const {
const { productInfo, databases } = require('../services');

/**
* @global FMS_API_CLIENT
* @global
*/
global.FMS_API_CLIENT = {};

Expand Down

0 comments on commit 4460a4e

Please sign in to comment.