@flowio/api-internal-mock-generator 0.1.8 → 0.1.10
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.
- package/dist/api-internal.json +93 -0
- package/dist/index.js +2 -2
- package/package.json +3 -4
- package/src/api-internal.json +93 -0
- package/tsconfig.json +1 -1
- package/LICENSE +0 -21
package/dist/api-internal.json
CHANGED
|
@@ -8608,6 +8608,25 @@
|
|
|
8608
8608
|
"type": "map[io.flow.harmonization.internal.v0.models.tariff_code_duty]",
|
|
8609
8609
|
"required": true
|
|
8610
8610
|
}]
|
|
8611
|
+
}, {
|
|
8612
|
+
"plural": "item_query_responses",
|
|
8613
|
+
"name": "item_query_response",
|
|
8614
|
+
"attributes": [],
|
|
8615
|
+
"fields": [{
|
|
8616
|
+
"name": "q",
|
|
8617
|
+
"annotations": [],
|
|
8618
|
+
"description": "The query used to filter these items.",
|
|
8619
|
+
"attributes": [],
|
|
8620
|
+
"type": "string",
|
|
8621
|
+
"required": true
|
|
8622
|
+
}, {
|
|
8623
|
+
"name": "items",
|
|
8624
|
+
"annotations": [],
|
|
8625
|
+
"description": "List of items matching the query.",
|
|
8626
|
+
"attributes": [],
|
|
8627
|
+
"type": "[io.flow.catalog.v0.models.item]",
|
|
8628
|
+
"required": true
|
|
8629
|
+
}]
|
|
8611
8630
|
}, {
|
|
8612
8631
|
"plural": "item_restrictions",
|
|
8613
8632
|
"name": "item_restriction",
|
|
@@ -31723,6 +31742,80 @@
|
|
|
31723
31742
|
"required": false,
|
|
31724
31743
|
"example": "en"
|
|
31725
31744
|
}]
|
|
31745
|
+
}, {
|
|
31746
|
+
"path": "/:organization/experiences/:experience_key/items/query",
|
|
31747
|
+
"method": "GET",
|
|
31748
|
+
"responses": [{
|
|
31749
|
+
"code": {
|
|
31750
|
+
"integer": {
|
|
31751
|
+
"value": 200
|
|
31752
|
+
}
|
|
31753
|
+
},
|
|
31754
|
+
"description": "Successful response",
|
|
31755
|
+
"attributes": [],
|
|
31756
|
+
"type": "item_query_response"
|
|
31757
|
+
}, {
|
|
31758
|
+
"code": {
|
|
31759
|
+
"integer": {
|
|
31760
|
+
"value": 401
|
|
31761
|
+
}
|
|
31762
|
+
},
|
|
31763
|
+
"description": "Authorization failed",
|
|
31764
|
+
"attributes": [],
|
|
31765
|
+
"type": "unit"
|
|
31766
|
+
}, {
|
|
31767
|
+
"code": {
|
|
31768
|
+
"integer": {
|
|
31769
|
+
"value": 404
|
|
31770
|
+
}
|
|
31771
|
+
},
|
|
31772
|
+
"description": "Resource was not found",
|
|
31773
|
+
"attributes": [],
|
|
31774
|
+
"type": "unit"
|
|
31775
|
+
}, {
|
|
31776
|
+
"code": {
|
|
31777
|
+
"integer": {
|
|
31778
|
+
"value": 422
|
|
31779
|
+
}
|
|
31780
|
+
},
|
|
31781
|
+
"description": "One or more errors were found with the data sent in the request. The body of the response contains specific details on what data failed validation.",
|
|
31782
|
+
"attributes": [],
|
|
31783
|
+
"type": "io.flow.error.v0.models.generic_error"
|
|
31784
|
+
}],
|
|
31785
|
+
"description": "Returns localized information about 0 or more items given a query for the specified experience.",
|
|
31786
|
+
"attributes": [],
|
|
31787
|
+
"parameters": [{
|
|
31788
|
+
"name": "organization",
|
|
31789
|
+
"description": "Refers to your organization's account identifier",
|
|
31790
|
+
"location": "Path",
|
|
31791
|
+
"type": "string",
|
|
31792
|
+
"required": true
|
|
31793
|
+
}, {
|
|
31794
|
+
"name": "experience_key",
|
|
31795
|
+
"location": "Path",
|
|
31796
|
+
"type": "string",
|
|
31797
|
+
"required": true
|
|
31798
|
+
}, {
|
|
31799
|
+
"name": "q",
|
|
31800
|
+
"description": "Filter to items matching this query. Defaults to all items.",
|
|
31801
|
+
"location": "Query",
|
|
31802
|
+
"type": "string",
|
|
31803
|
+
"required": false,
|
|
31804
|
+
"example": "number in (1,2,3)"
|
|
31805
|
+
}, {
|
|
31806
|
+
"name": "country",
|
|
31807
|
+
"description": "If specified, we will select the experience matching this country. ISO 3166 3 currency code as defined in https://api.flow.io/reference/countries",
|
|
31808
|
+
"location": "Query",
|
|
31809
|
+
"type": "string",
|
|
31810
|
+
"required": false,
|
|
31811
|
+
"example": "CAN"
|
|
31812
|
+
}, {
|
|
31813
|
+
"name": "currency",
|
|
31814
|
+
"description": "Iso 4217 3 currency code as defined in https://api.flow.io/reference/currencies If specified, translate the pricing to this currency. Translation occurs using the current spot rate for this currency from the base currency in the experience.",
|
|
31815
|
+
"location": "Query",
|
|
31816
|
+
"type": "string",
|
|
31817
|
+
"required": false
|
|
31818
|
+
}]
|
|
31726
31819
|
}],
|
|
31727
31820
|
"attributes": [{
|
|
31728
31821
|
"name": "docs",
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
var apibuilder_mock_generator_1 = require("apibuilder-mock-generator");
|
|
7
|
+
var api_internal_json_1 = __importDefault(require("./api-internal.json"));
|
|
8
8
|
exports.default = apibuilder_mock_generator_1.createMockGenerator(api_internal_json_1.default);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowio/api-internal-mock-generator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "A mock data generator based on our internal API specifications for JavaScript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,12 +26,11 @@
|
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"apibuilder-js": "0.0.5",
|
|
29
|
-
"apibuilder-mock-generator": "0.0.
|
|
29
|
+
"apibuilder-mock-generator": "0.0.8"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"tslint": "^5.11.0",
|
|
33
33
|
"tslint-config-airbnb": "^5.11.1",
|
|
34
34
|
"typescript": "^3.2.2"
|
|
35
|
-
}
|
|
36
|
-
"gitHead": "c8cc47ba346ea31620799025e79aa372d75316da"
|
|
35
|
+
}
|
|
37
36
|
}
|
package/src/api-internal.json
CHANGED
|
@@ -8608,6 +8608,25 @@
|
|
|
8608
8608
|
"type" : "map[io.flow.harmonization.internal.v0.models.tariff_code_duty]",
|
|
8609
8609
|
"required" : true
|
|
8610
8610
|
} ]
|
|
8611
|
+
}, {
|
|
8612
|
+
"plural" : "item_query_responses",
|
|
8613
|
+
"name" : "item_query_response",
|
|
8614
|
+
"attributes" : [ ],
|
|
8615
|
+
"fields" : [ {
|
|
8616
|
+
"name" : "q",
|
|
8617
|
+
"annotations" : [ ],
|
|
8618
|
+
"description" : "The query used to filter these items.",
|
|
8619
|
+
"attributes" : [ ],
|
|
8620
|
+
"type" : "string",
|
|
8621
|
+
"required" : true
|
|
8622
|
+
}, {
|
|
8623
|
+
"name" : "items",
|
|
8624
|
+
"annotations" : [ ],
|
|
8625
|
+
"description" : "List of items matching the query.",
|
|
8626
|
+
"attributes" : [ ],
|
|
8627
|
+
"type" : "[io.flow.catalog.v0.models.item]",
|
|
8628
|
+
"required" : true
|
|
8629
|
+
} ]
|
|
8611
8630
|
}, {
|
|
8612
8631
|
"plural" : "item_restrictions",
|
|
8613
8632
|
"name" : "item_restriction",
|
|
@@ -31723,6 +31742,80 @@
|
|
|
31723
31742
|
"required" : false,
|
|
31724
31743
|
"example" : "en"
|
|
31725
31744
|
} ]
|
|
31745
|
+
}, {
|
|
31746
|
+
"path" : "/:organization/experiences/:experience_key/items/query",
|
|
31747
|
+
"method" : "GET",
|
|
31748
|
+
"responses" : [ {
|
|
31749
|
+
"code" : {
|
|
31750
|
+
"integer" : {
|
|
31751
|
+
"value" : 200
|
|
31752
|
+
}
|
|
31753
|
+
},
|
|
31754
|
+
"description" : "Successful response",
|
|
31755
|
+
"attributes" : [ ],
|
|
31756
|
+
"type" : "item_query_response"
|
|
31757
|
+
}, {
|
|
31758
|
+
"code" : {
|
|
31759
|
+
"integer" : {
|
|
31760
|
+
"value" : 401
|
|
31761
|
+
}
|
|
31762
|
+
},
|
|
31763
|
+
"description" : "Authorization failed",
|
|
31764
|
+
"attributes" : [ ],
|
|
31765
|
+
"type" : "unit"
|
|
31766
|
+
}, {
|
|
31767
|
+
"code" : {
|
|
31768
|
+
"integer" : {
|
|
31769
|
+
"value" : 404
|
|
31770
|
+
}
|
|
31771
|
+
},
|
|
31772
|
+
"description" : "Resource was not found",
|
|
31773
|
+
"attributes" : [ ],
|
|
31774
|
+
"type" : "unit"
|
|
31775
|
+
}, {
|
|
31776
|
+
"code" : {
|
|
31777
|
+
"integer" : {
|
|
31778
|
+
"value" : 422
|
|
31779
|
+
}
|
|
31780
|
+
},
|
|
31781
|
+
"description" : "One or more errors were found with the data sent in the request. The body of the response contains specific details on what data failed validation.",
|
|
31782
|
+
"attributes" : [ ],
|
|
31783
|
+
"type" : "io.flow.error.v0.models.generic_error"
|
|
31784
|
+
} ],
|
|
31785
|
+
"description" : "Returns localized information about 0 or more items given a query for the specified experience.",
|
|
31786
|
+
"attributes" : [ ],
|
|
31787
|
+
"parameters" : [ {
|
|
31788
|
+
"name" : "organization",
|
|
31789
|
+
"description" : "Refers to your organization's account identifier",
|
|
31790
|
+
"location" : "Path",
|
|
31791
|
+
"type" : "string",
|
|
31792
|
+
"required" : true
|
|
31793
|
+
}, {
|
|
31794
|
+
"name" : "experience_key",
|
|
31795
|
+
"location" : "Path",
|
|
31796
|
+
"type" : "string",
|
|
31797
|
+
"required" : true
|
|
31798
|
+
}, {
|
|
31799
|
+
"name" : "q",
|
|
31800
|
+
"description" : "Filter to items matching this query. Defaults to all items.",
|
|
31801
|
+
"location" : "Query",
|
|
31802
|
+
"type" : "string",
|
|
31803
|
+
"required" : false,
|
|
31804
|
+
"example" : "number in (1,2,3)"
|
|
31805
|
+
}, {
|
|
31806
|
+
"name" : "country",
|
|
31807
|
+
"description" : "If specified, we will select the experience matching this country. ISO 3166 3 currency code as defined in https://api.flow.io/reference/countries",
|
|
31808
|
+
"location" : "Query",
|
|
31809
|
+
"type" : "string",
|
|
31810
|
+
"required" : false,
|
|
31811
|
+
"example" : "CAN"
|
|
31812
|
+
}, {
|
|
31813
|
+
"name" : "currency",
|
|
31814
|
+
"description" : "Iso 4217 3 currency code as defined in https://api.flow.io/reference/currencies If specified, translate the pricing to this currency. Translation occurs using the current spot rate for this currency from the base currency in the experience.",
|
|
31815
|
+
"location" : "Query",
|
|
31816
|
+
"type" : "string",
|
|
31817
|
+
"required" : false
|
|
31818
|
+
} ]
|
|
31726
31819
|
} ],
|
|
31727
31820
|
"attributes" : [ {
|
|
31728
31821
|
"name" : "docs",
|
package/tsconfig.json
CHANGED
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017 Flow Commerce
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|