switchboard-contract 1.9.5
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.
- checksums.yaml +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/Rakefile +3 -0
- data/contracts/3/compiled/advice_session.avpr +190 -0
- data/contracts/3/compiled/advice_session_image.avpr +36 -0
- data/contracts/3/compiled/advice_session_review.avpr +90 -0
- data/contracts/3/compiled/advisor.avpr +77 -0
- data/contracts/3/compiled/advisor_config.avpr +38 -0
- data/contracts/3/compiled/lawyer.avpr +83 -0
- data/contracts/3/compiled/location.avpr +128 -0
- data/contracts/3/compiled/offer.avpr +111 -0
- data/contracts/3/compiled/package.avpr +85 -0
- data/contracts/3/compiled/package_detail.avpr +100 -0
- data/contracts/3/compiled/provider_offer.avpr +144 -0
- data/contracts/3/compiled/specialty.avpr +61 -0
- data/contracts/3/compiled/user.avpr +50 -0
- data/contracts/3/compiled/user_authentication.avpr +111 -0
- data/contracts/3/source/advice_session.avdl +72 -0
- data/contracts/3/source/advice_session_image.avdl +16 -0
- data/contracts/3/source/advice_session_review.avdl +40 -0
- data/contracts/3/source/advisor.avdl +30 -0
- data/contracts/3/source/advisor_config.avdl +17 -0
- data/contracts/3/source/common.inc +20 -0
- data/contracts/3/source/lawyer.avdl +45 -0
- data/contracts/3/source/location.avdl +76 -0
- data/contracts/3/source/offer.avdl +51 -0
- data/contracts/3/source/package.avdl +36 -0
- data/contracts/3/source/package_detail.avdl +41 -0
- data/contracts/3/source/provider_offer.avdl +38 -0
- data/contracts/3/source/specialty.avdl +33 -0
- data/contracts/3/source/user.avdl +12 -0
- data/contracts/3/source/user_authentication.avdl +57 -0
- data/contracts/4/compiled/lawyer.avpr +127 -0
- data/contracts/4/compiled/lawyer_address.avpr +54 -0
- data/contracts/4/compiled/review.avpr +44 -0
- data/contracts/4/compiled/specialty.avpr +43 -0
- data/contracts/4/source/lawyer.avdl +69 -0
- data/contracts/4/source/lawyer_address.avdl +31 -0
- data/contracts/4/source/review.avdl +28 -0
- data/contracts/4/source/specialty.avdl +23 -0
- data/contracts/messaging/compiled/access_token.avpr +41 -0
- data/contracts/messaging/compiled/channel.avpr +111 -0
- data/contracts/messaging/source/access_token.avdl +21 -0
- data/contracts/messaging/source/channel.avdl +59 -0
- data/contracts/mobile/compiled/advice_session.avpr +160 -0
- data/contracts/mobile/compiled/checkout.avpr +115 -0
- data/contracts/mobile/compiled/lawyer.avpr +787 -0
- data/contracts/mobile/compiled/offer.avpr +111 -0
- data/contracts/mobile/compiled/package.avpr +85 -0
- data/contracts/mobile/compiled/package_detail.avpr +100 -0
- data/contracts/mobile/compiled/package_slug.avpr +67 -0
- data/contracts/mobile/compiled/promotion.avpr +45 -0
- data/contracts/mobile/compiled/provider_offer.avpr +144 -0
- data/contracts/mobile/compiled/review.avpr +83 -0
- data/contracts/mobile/compiled/specialty.avpr +55 -0
- data/contracts/mobile/source/advice_session.avdl +61 -0
- data/contracts/mobile/source/checkout.avdl +90 -0
- data/contracts/mobile/source/lawyer.avdl +321 -0
- data/contracts/mobile/source/offer.avdl +51 -0
- data/contracts/mobile/source/package.avdl +36 -0
- data/contracts/mobile/source/package_detail.avdl +41 -0
- data/contracts/mobile/source/package_slug.avdl +30 -0
- data/contracts/mobile/source/promotion.avdl +18 -0
- data/contracts/mobile/source/provider_offer.avdl +38 -0
- data/contracts/mobile/source/review.avdl +43 -0
- data/contracts/mobile/source/specialty.avdl +32 -0
- data/contracts/sales_force/compiled/account.avpr +94 -0
- data/contracts/sales_force/compiled/account_professional.avpr +39 -0
- data/contracts/sales_force/source/account.avdl +50 -0
- data/contracts/sales_force/source/account_professional.avdl +14 -0
- data/contracts/verify/compiled/lawyer.avpr +79 -0
- data/contracts/verify/compiled/license.avpr +64 -0
- data/contracts/verify/source/lawyer.avdl +41 -0
- data/contracts/verify/source/license.avdl +36 -0
- data/lib/switchboard/contract.rb +8 -0
- data/lib/switchboard/contract/documentation.rb +7 -0
- data/lib/switchboard/contract/service.rb +15 -0
- data/lib/switchboard/contract/version.rb +5 -0
- metadata +164 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
{
|
2
|
+
"protocol" : "AdvisorConfig",
|
3
|
+
"namespace" : "Switchboard",
|
4
|
+
"types" : [ {
|
5
|
+
"type" : "record",
|
6
|
+
"name" : "AdvisorConfig",
|
7
|
+
"doc" : "The main class for this protocol",
|
8
|
+
"fields" : [ {
|
9
|
+
"name" : "enabled_states",
|
10
|
+
"type" : {
|
11
|
+
"type" : "array",
|
12
|
+
"items" : "string"
|
13
|
+
}
|
14
|
+
}, {
|
15
|
+
"name" : "enabled_specialty_ids",
|
16
|
+
"type" : {
|
17
|
+
"type" : "array",
|
18
|
+
"items" : "int"
|
19
|
+
}
|
20
|
+
}, {
|
21
|
+
"name" : "default_advice_session_price_in_cents",
|
22
|
+
"type" : "int"
|
23
|
+
}, {
|
24
|
+
"name" : "payment_gateway",
|
25
|
+
"type" : [ "null", "string" ]
|
26
|
+
} ]
|
27
|
+
} ],
|
28
|
+
"messages" : {
|
29
|
+
"index" : {
|
30
|
+
"doc" : "Return the Config",
|
31
|
+
"request" : [ ],
|
32
|
+
"response" : {
|
33
|
+
"type" : "array",
|
34
|
+
"items" : "AdvisorConfig"
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
{
|
2
|
+
"protocol" : "Lawyer",
|
3
|
+
"namespace" : "Switchboard",
|
4
|
+
"types" : [ {
|
5
|
+
"type" : "record",
|
6
|
+
"name" : "Lawyer",
|
7
|
+
"doc" : "The main class for this protocol",
|
8
|
+
"fields" : [ {
|
9
|
+
"name" : "id",
|
10
|
+
"type" : "int",
|
11
|
+
"doc" : "The primary key"
|
12
|
+
}, {
|
13
|
+
"name" : "firstname",
|
14
|
+
"type" : "string",
|
15
|
+
"doc" : "Their name"
|
16
|
+
}, {
|
17
|
+
"name" : "middlename",
|
18
|
+
"type" : "string"
|
19
|
+
}, {
|
20
|
+
"name" : "lastname",
|
21
|
+
"type" : "string"
|
22
|
+
}, {
|
23
|
+
"name" : "claimed",
|
24
|
+
"type" : "boolean",
|
25
|
+
"doc" : "Is the lawyer claimed?"
|
26
|
+
}, {
|
27
|
+
"name" : "claimed_by",
|
28
|
+
"type" : "int",
|
29
|
+
"doc" : "id of claiming user *"
|
30
|
+
}, {
|
31
|
+
"name" : "headshot_url",
|
32
|
+
"type" : "string",
|
33
|
+
"doc" : "Url to their full-size headshot photo"
|
34
|
+
}, {
|
35
|
+
"name" : "avvo_rating",
|
36
|
+
"type" : "float",
|
37
|
+
"doc" : "Avvo Rating (Scale of 1-10)"
|
38
|
+
}, {
|
39
|
+
"name" : "aggregate_client_review_score",
|
40
|
+
"type" : "float",
|
41
|
+
"doc" : "Average client review score (Scale of 1-5)"
|
42
|
+
}, {
|
43
|
+
"name" : "client_review_count",
|
44
|
+
"type" : "int",
|
45
|
+
"doc" : "Number of reviews the average is based upon"
|
46
|
+
}, {
|
47
|
+
"name" : "specialty_ids",
|
48
|
+
"type" : {
|
49
|
+
"type" : "array",
|
50
|
+
"items" : "int"
|
51
|
+
},
|
52
|
+
"doc" : "List of specialties this lawyer practices"
|
53
|
+
}, {
|
54
|
+
"name" : "licensed_states",
|
55
|
+
"type" : {
|
56
|
+
"type" : "array",
|
57
|
+
"items" : "string"
|
58
|
+
},
|
59
|
+
"doc" : "List of states this lawyer is licensed in"
|
60
|
+
} ]
|
61
|
+
} ],
|
62
|
+
"messages" : {
|
63
|
+
"index" : {
|
64
|
+
"doc" : "Look up many lawyers in bulk",
|
65
|
+
"request" : [ ],
|
66
|
+
"response" : {
|
67
|
+
"type" : "array",
|
68
|
+
"items" : "Lawyer"
|
69
|
+
}
|
70
|
+
},
|
71
|
+
"show" : {
|
72
|
+
"doc" : "Look up a single lawyer by id",
|
73
|
+
"request" : [ {
|
74
|
+
"name" : "id",
|
75
|
+
"type" : "int"
|
76
|
+
} ],
|
77
|
+
"response" : {
|
78
|
+
"type" : "array",
|
79
|
+
"items" : "Lawyer"
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
@@ -0,0 +1,128 @@
|
|
1
|
+
{
|
2
|
+
"protocol" : "Location",
|
3
|
+
"namespace" : "Switchboard",
|
4
|
+
"types" : [ {
|
5
|
+
"type" : "record",
|
6
|
+
"name" : "Location",
|
7
|
+
"doc" : "The main class for this protocol",
|
8
|
+
"fields" : [ {
|
9
|
+
"name" : "id",
|
10
|
+
"type" : "int",
|
11
|
+
"doc" : "The primary key"
|
12
|
+
}, {
|
13
|
+
"name" : "type",
|
14
|
+
"type" : "string",
|
15
|
+
"doc" : "What type of record this is. (Gnomon::Country, Gnomon::State, Gnomon::County, Gnomon::City, Gnomon::PostalCode, Gnomon::Neighborhood)"
|
16
|
+
}, {
|
17
|
+
"name" : "county_name",
|
18
|
+
"type" : "string",
|
19
|
+
"doc" : "Name of the county this location is in (or nil)"
|
20
|
+
}, {
|
21
|
+
"name" : "state_name",
|
22
|
+
"type" : "string",
|
23
|
+
"doc" : "Name of the state this location is in (or nil)"
|
24
|
+
}, {
|
25
|
+
"name" : "state_code",
|
26
|
+
"type" : "string",
|
27
|
+
"doc" : "Short name of state *"
|
28
|
+
}, {
|
29
|
+
"name" : "country_name",
|
30
|
+
"type" : "string",
|
31
|
+
"doc" : "Name of the country this location is in (or nil)"
|
32
|
+
}, {
|
33
|
+
"name" : "city_name",
|
34
|
+
"type" : "string",
|
35
|
+
"doc" : "Name of the city this location is in (or nil)"
|
36
|
+
}, {
|
37
|
+
"name" : "neighborhood_name",
|
38
|
+
"type" : "string",
|
39
|
+
"doc" : "Name of the neighborhood this location is in (or nil)"
|
40
|
+
}, {
|
41
|
+
"name" : "postal_code_name",
|
42
|
+
"type" : "string",
|
43
|
+
"doc" : "Zip code of this location (or nil)"
|
44
|
+
}, {
|
45
|
+
"name" : "to_location",
|
46
|
+
"type" : "string",
|
47
|
+
"doc" : "Most common description of this location"
|
48
|
+
}, {
|
49
|
+
"name" : "to_short_location",
|
50
|
+
"type" : "string",
|
51
|
+
"doc" : "Shorter description of this location"
|
52
|
+
}, {
|
53
|
+
"name" : "to_long_location",
|
54
|
+
"type" : "string",
|
55
|
+
"doc" : "More verbose description of this location"
|
56
|
+
}, {
|
57
|
+
"name" : "to_location_with_region",
|
58
|
+
"type" : "string",
|
59
|
+
"doc" : "More verbose description of this location, usually with 3 levels of detail"
|
60
|
+
}, {
|
61
|
+
"name" : "latitude",
|
62
|
+
"type" : "float",
|
63
|
+
"doc" : "Latitude of the center of this location"
|
64
|
+
}, {
|
65
|
+
"name" : "longitude",
|
66
|
+
"type" : "float",
|
67
|
+
"doc" : "Longitude of the center of this location"
|
68
|
+
}, {
|
69
|
+
"name" : "population",
|
70
|
+
"type" : "int",
|
71
|
+
"doc" : "Approximate population of this location"
|
72
|
+
}, {
|
73
|
+
"name" : "updated_at",
|
74
|
+
"type" : "string",
|
75
|
+
"doc" : "Datetime string of when this location was last updated"
|
76
|
+
} ]
|
77
|
+
}, {
|
78
|
+
"type" : "record",
|
79
|
+
"name" : "LocationFetchOption",
|
80
|
+
"doc" : "Options you can send for limiting Location results",
|
81
|
+
"fields" : [ {
|
82
|
+
"name" : "page",
|
83
|
+
"type" : "int",
|
84
|
+
"doc" : "Which page of records to fetch",
|
85
|
+
"default" : 1
|
86
|
+
}, {
|
87
|
+
"name" : "per_page",
|
88
|
+
"type" : "int",
|
89
|
+
"doc" : "How many records per page",
|
90
|
+
"default" : 30
|
91
|
+
} ]
|
92
|
+
} ],
|
93
|
+
"messages" : {
|
94
|
+
"index" : {
|
95
|
+
"doc" : "Returns a list of Locations",
|
96
|
+
"request" : [ {
|
97
|
+
"name" : "options",
|
98
|
+
"type" : "LocationFetchOption"
|
99
|
+
} ],
|
100
|
+
"response" : {
|
101
|
+
"type" : "array",
|
102
|
+
"items" : "Location"
|
103
|
+
}
|
104
|
+
},
|
105
|
+
"show" : {
|
106
|
+
"doc" : "Return a single Location",
|
107
|
+
"request" : [ {
|
108
|
+
"name" : "id",
|
109
|
+
"type" : "int"
|
110
|
+
} ],
|
111
|
+
"response" : {
|
112
|
+
"type" : "array",
|
113
|
+
"items" : "Location"
|
114
|
+
}
|
115
|
+
},
|
116
|
+
"resolve" : {
|
117
|
+
"doc" : "Try to guess a location from a given string",
|
118
|
+
"request" : [ {
|
119
|
+
"name" : "q",
|
120
|
+
"type" : "string"
|
121
|
+
} ],
|
122
|
+
"response" : {
|
123
|
+
"type" : "array",
|
124
|
+
"items" : "Location"
|
125
|
+
}
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
@@ -0,0 +1,111 @@
|
|
1
|
+
{
|
2
|
+
"protocol" : "Offer",
|
3
|
+
"namespace" : "Switchboard",
|
4
|
+
"types" : [ {
|
5
|
+
"type" : "record",
|
6
|
+
"name" : "Package",
|
7
|
+
"fields" : [ {
|
8
|
+
"name" : "id",
|
9
|
+
"type" : "int",
|
10
|
+
"doc" : "The primary key"
|
11
|
+
}, {
|
12
|
+
"name" : "name",
|
13
|
+
"type" : "string"
|
14
|
+
}, {
|
15
|
+
"name" : "short_description",
|
16
|
+
"type" : "string"
|
17
|
+
}, {
|
18
|
+
"name" : "call",
|
19
|
+
"type" : "boolean"
|
20
|
+
}, {
|
21
|
+
"name" : "call_duration_in_minutes",
|
22
|
+
"type" : "int"
|
23
|
+
}, {
|
24
|
+
"name" : "document",
|
25
|
+
"type" : "boolean"
|
26
|
+
}, {
|
27
|
+
"name" : "max_document_length_in_pages",
|
28
|
+
"type" : "int"
|
29
|
+
}, {
|
30
|
+
"name" : "claim_game",
|
31
|
+
"type" : "boolean"
|
32
|
+
}, {
|
33
|
+
"name" : "offline",
|
34
|
+
"type" : "boolean"
|
35
|
+
}, {
|
36
|
+
"name" : "specialty_id",
|
37
|
+
"type" : "int"
|
38
|
+
}, {
|
39
|
+
"name" : "micro_description",
|
40
|
+
"type" : "string"
|
41
|
+
} ]
|
42
|
+
}, {
|
43
|
+
"type" : "record",
|
44
|
+
"name" : "Offer",
|
45
|
+
"doc" : "The main class for this protocol",
|
46
|
+
"fields" : [ {
|
47
|
+
"name" : "id",
|
48
|
+
"type" : "int",
|
49
|
+
"doc" : "The primary key"
|
50
|
+
}, {
|
51
|
+
"name" : "state_id",
|
52
|
+
"type" : "int"
|
53
|
+
}, {
|
54
|
+
"name" : "consumer_fee_in_cents",
|
55
|
+
"type" : "int"
|
56
|
+
}, {
|
57
|
+
"name" : "package",
|
58
|
+
"type" : "Package"
|
59
|
+
} ]
|
60
|
+
}, {
|
61
|
+
"type" : "record",
|
62
|
+
"name" : "OfferFetchOption",
|
63
|
+
"fields" : [ {
|
64
|
+
"name" : "page",
|
65
|
+
"type" : "int",
|
66
|
+
"doc" : "Which page of records to fetch",
|
67
|
+
"default" : 1
|
68
|
+
}, {
|
69
|
+
"name" : "per_page",
|
70
|
+
"type" : "int",
|
71
|
+
"doc" : "How many records per page",
|
72
|
+
"default" : 10
|
73
|
+
}, {
|
74
|
+
"name" : "package_id",
|
75
|
+
"type" : "int",
|
76
|
+
"doc" : "The ID of the package this offer is associated with."
|
77
|
+
}, {
|
78
|
+
"name" : "enabled",
|
79
|
+
"type" : "boolean",
|
80
|
+
"doc" : "Enabled meaning it is available for the public to purchase."
|
81
|
+
}, {
|
82
|
+
"name" : "name",
|
83
|
+
"type" : "string",
|
84
|
+
"doc" : "The name of the package this offer is associated with."
|
85
|
+
} ]
|
86
|
+
} ],
|
87
|
+
"messages" : {
|
88
|
+
"index" : {
|
89
|
+
"doc" : "Returns a list of Offers",
|
90
|
+
"request" : [ {
|
91
|
+
"name" : "options",
|
92
|
+
"type" : "OfferFetchOption"
|
93
|
+
} ],
|
94
|
+
"response" : {
|
95
|
+
"type" : "array",
|
96
|
+
"items" : "Offer"
|
97
|
+
}
|
98
|
+
},
|
99
|
+
"show" : {
|
100
|
+
"doc" : "Return a single Offer",
|
101
|
+
"request" : [ {
|
102
|
+
"name" : "id",
|
103
|
+
"type" : "int"
|
104
|
+
} ],
|
105
|
+
"response" : {
|
106
|
+
"type" : "array",
|
107
|
+
"items" : "Offer"
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
{
|
2
|
+
"protocol" : "Package",
|
3
|
+
"namespace" : "Switchboard",
|
4
|
+
"types" : [ {
|
5
|
+
"type" : "record",
|
6
|
+
"name" : "Package",
|
7
|
+
"doc" : "The main class for this protocol",
|
8
|
+
"fields" : [ {
|
9
|
+
"name" : "id",
|
10
|
+
"type" : "int",
|
11
|
+
"doc" : "The primary key"
|
12
|
+
}, {
|
13
|
+
"name" : "name",
|
14
|
+
"type" : "string"
|
15
|
+
}, {
|
16
|
+
"name" : "short_description",
|
17
|
+
"type" : "string"
|
18
|
+
}, {
|
19
|
+
"name" : "call",
|
20
|
+
"type" : "boolean"
|
21
|
+
}, {
|
22
|
+
"name" : "call_duration_in_minutes",
|
23
|
+
"type" : "int"
|
24
|
+
}, {
|
25
|
+
"name" : "document",
|
26
|
+
"type" : "boolean"
|
27
|
+
}, {
|
28
|
+
"name" : "max_document_length_in_pages",
|
29
|
+
"type" : "int"
|
30
|
+
}, {
|
31
|
+
"name" : "claim_game",
|
32
|
+
"type" : "boolean"
|
33
|
+
}, {
|
34
|
+
"name" : "offline",
|
35
|
+
"type" : "boolean"
|
36
|
+
}, {
|
37
|
+
"name" : "specialty_id",
|
38
|
+
"type" : "int"
|
39
|
+
}, {
|
40
|
+
"name" : "micro_description",
|
41
|
+
"type" : "string"
|
42
|
+
} ]
|
43
|
+
}, {
|
44
|
+
"type" : "record",
|
45
|
+
"name" : "PackageFetchOption",
|
46
|
+
"fields" : [ {
|
47
|
+
"name" : "page",
|
48
|
+
"type" : "int",
|
49
|
+
"doc" : "Which page of records to fetch",
|
50
|
+
"default" : 1
|
51
|
+
}, {
|
52
|
+
"name" : "per_page",
|
53
|
+
"type" : "int",
|
54
|
+
"doc" : "How many records per page",
|
55
|
+
"default" : 10
|
56
|
+
}, {
|
57
|
+
"name" : "specialty_id",
|
58
|
+
"type" : "int"
|
59
|
+
} ]
|
60
|
+
} ],
|
61
|
+
"messages" : {
|
62
|
+
"index" : {
|
63
|
+
"doc" : "Returns a list of Packages",
|
64
|
+
"request" : [ {
|
65
|
+
"name" : "options",
|
66
|
+
"type" : "PackageFetchOption"
|
67
|
+
} ],
|
68
|
+
"response" : {
|
69
|
+
"type" : "array",
|
70
|
+
"items" : "Package"
|
71
|
+
}
|
72
|
+
},
|
73
|
+
"show" : {
|
74
|
+
"doc" : "Return a single Package",
|
75
|
+
"request" : [ {
|
76
|
+
"name" : "id",
|
77
|
+
"type" : "int"
|
78
|
+
} ],
|
79
|
+
"response" : {
|
80
|
+
"type" : "array",
|
81
|
+
"items" : "Package"
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|