workstream_protocol 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dce3c7dad672e57037c6e332a3107788c5a9dc66b8db823be239d7125e876829
4
- data.tar.gz: 9c96d84a74a5884833e78ac197cc41b42c2f67d524077d89a60a6fe79f672e1d
3
+ metadata.gz: c1de469c41d073757727b09e786bd6d6f93678d8c448bd45caf14ad549c6621f
4
+ data.tar.gz: 06d1f68821b58e160832555b645e52459fb3a0c486820a4246ef5545f7e6a72d
5
5
  SHA512:
6
- metadata.gz: 53e021847ee609e13c641a62a5521f23f640d5adb57d9425dfb45e7e82e448f7cd9b007fb5f2180d2d4295001b5c35129187dab102e4b3962173609cc3fbf766
7
- data.tar.gz: bdb914d5d7438a5e0919e75015401a27298a615b47c9d4090f3b846cb15cc9f70807e63f76de51119e07e49cb03fbfd440a957cda7bc4bb7a0c3d51d093ce62b
6
+ metadata.gz: f3524b96e1267f0dd6a66b5f71f69e05efef269bcc9e3d50bf5bf61cbe38aa02b4f1107e8eed1abc1eb4e12b51774a071597dbbb509f77ea1cf3bd2448684832
7
+ data.tar.gz: c7556003a50d391bf05c7da64098d64d2a46fdce61d3bbb84e5688a368a157a78d2ed836c6910de43458666131930f6c9c265fbdbfde92d7999cd0cd094f4791
@@ -2,6 +2,9 @@ protocols = File.expand_path("../workstream_protocol", __FILE__)
2
2
  $LOAD_PATH.unshift(protocols) unless $LOAD_PATH.include?(protocols)
3
3
 
4
4
  require 'Onboarding_pb'
5
+ require 'utils/timestamp'
6
+ require 'utils/date'
7
+
5
8
 
6
9
  module WorkstreamProtocol
7
10
 
@@ -4,7 +4,6 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  require 'Common/CountryCode_pb'
7
-
8
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
8
  add_file("Common/Address.proto", :syntax => :proto3) do
10
9
  add_message "Workstream.Protocol.Common.Address" do
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: Common/Date.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("Common/Date.proto", :syntax => :proto3) do
8
+ add_message "Workstream.Protocol.Common.Date" do
9
+ optional :year, :int32, 1
10
+ optional :month, :int32, 2
11
+ optional :day, :int32, 3
12
+ end
13
+ end
14
+ end
15
+
16
+ module Workstream
17
+ module Protocol
18
+ module Common
19
+ Date = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Common.Date").msgclass
20
+ end
21
+ end
22
+ end
@@ -6,44 +6,35 @@ require 'google/protobuf'
6
6
  require 'Common/Phone_pb'
7
7
  require 'Common/Address_pb'
8
8
  require 'google/protobuf/timestamp_pb'
9
+ require 'Common/Date_pb'
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("Onboarding.proto", :syntax => :proto3) do
11
12
  add_message "Workstream.Protocol.Onboarding.CompanyEvent" do
12
13
  optional :uuid, :string, 1
13
- optional :id, :int64, 2
14
- optional :created_at, :message, 3, "google.protobuf.Timestamp"
15
- optional :updated_at, :message, 4, "google.protobuf.Timestamp"
14
+ optional :created_at, :message, 2, "google.protobuf.Timestamp"
15
+ optional :updated_at, :message, 3, "google.protobuf.Timestamp"
16
+ optional :deleted_at, :message, 4, "google.protobuf.Timestamp"
16
17
  optional :name, :string, 5
17
- optional :status, :enum, 6, "Workstream.Protocol.Onboarding.CompanyEvent.CompanyStatus"
18
- end
19
- add_enum "Workstream.Protocol.Onboarding.CompanyEvent.CompanyStatus" do
20
- value :ACTIVE, 0
21
- value :TEST, 1
22
- value :DISABLED, 2
23
- value :TEMPLATE, 3
18
+ optional :status, :string, 6
24
19
  end
25
20
  add_message "Workstream.Protocol.Onboarding.EmployeeEvent" do
26
21
  optional :uuid, :string, 1
27
- optional :id, :int64, 2
22
+ optional :company_uuid, :string, 2
28
23
  optional :created_at, :message, 3, "google.protobuf.Timestamp"
29
24
  optional :updated_at, :message, 4, "google.protobuf.Timestamp"
30
- optional :company_id, :int64, 5
25
+ optional :deleted_at, :message, 5, "google.protobuf.Timestamp"
31
26
  end
32
27
  add_message "Workstream.Protocol.Onboarding.CompanyStaffEvent" do
33
28
  optional :uuid, :string, 1
34
- optional :id, :int64, 2
29
+ optional :company_uuid, :string, 2
35
30
  optional :created_at, :message, 3, "google.protobuf.Timestamp"
36
31
  optional :updated_at, :message, 4, "google.protobuf.Timestamp"
37
- optional :status, :enum, 5, "Workstream.Protocol.Onboarding.CompanyStaffEvent.CompanyStaffStatus"
38
- optional :company_id, :int64, 6
32
+ optional :deleted_at, :message, 5, "google.protobuf.Timestamp"
33
+ optional :status, :string, 6
39
34
  optional :name, :string, 7
40
35
  optional :email, :string, 8
41
36
  optional :phone, :message, 9, "Workstream.Protocol.Common.Phone"
42
37
  end
43
- add_enum "Workstream.Protocol.Onboarding.CompanyStaffEvent.CompanyStaffStatus" do
44
- value :ACTIVE, 0
45
- value :DISABLED, 1
46
- end
47
38
  add_message "Workstream.Protocol.Onboarding.EmergencyContact" do
48
39
  optional :relationship, :string, 1
49
40
  optional :first_name, :string, 2
@@ -55,24 +46,25 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
55
46
  end
56
47
  add_message "Workstream.Protocol.Onboarding.EmployeeInformationEvent" do
57
48
  optional :uuid, :string, 1
58
- optional :id, :int64, 2
59
- optional :created_at, :message, 3, "google.protobuf.Timestamp"
60
- optional :updated_at, :message, 4, "google.protobuf.Timestamp"
61
- optional :company_id, :int64, 5
62
- optional :employee_id, :int64, 6
49
+ optional :employee_uuid, :string, 2
50
+ optional :company_uuid, :string, 3
51
+ optional :created_at, :message, 4, "google.protobuf.Timestamp"
52
+ optional :updated_at, :message, 5, "google.protobuf.Timestamp"
53
+ optional :deleted_at, :message, 6, "google.protobuf.Timestamp"
63
54
  optional :first_name, :string, 7
64
55
  optional :middle_name, :string, 8
65
56
  optional :last_name, :string, 9
66
57
  optional :prior_last_name, :string, 10
67
- optional :prefered_name, :string, 11
58
+ optional :preferred_name, :string, 11
68
59
  optional :salutation, :string, 12
69
60
  optional :ethnicity, :string, 13
70
61
  optional :gender, :string, 14
71
- optional :marital_status, :enum, 15, "Workstream.Protocol.Onboarding.MaritalStatus"
62
+ optional :marital_status, :string, 15
72
63
  optional :ssn, :string, 16
73
64
  optional :smoker, :bool, 17
74
65
  optional :nationality, :string, 18
75
- optional :date_of_birth, :string, 19
66
+ optional :date_of_birth, :message, 19, "Workstream.Protocol.Common.Date"
67
+ optional :middle_initial, :string, 20
76
68
  optional :home_email, :string, 31
77
69
  optional :home_phone, :message, 32, "Workstream.Protocol.Common.Phone"
78
70
  optional :home_address, :message, 33, "Workstream.Protocol.Common.Address"
@@ -81,10 +73,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
81
73
  optional :work_phone, :message, 43, "Workstream.Protocol.Common.Phone"
82
74
  optional :work_address, :message, 44, "Workstream.Protocol.Common.Address"
83
75
  repeated :emergency_contact, :message, 51, "Workstream.Protocol.Onboarding.EmergencyContact"
84
- optional :apply_date, :string, 52
85
- optional :hire_date, :string, 53
86
- optional :start_date, :string, 54
87
- optional :termination_date, :string, 55
76
+ optional :apply_date, :message, 52, "Workstream.Protocol.Common.Date"
77
+ optional :hire_date, :message, 53, "Workstream.Protocol.Common.Date"
78
+ optional :start_date, :message, 54, "Workstream.Protocol.Common.Date"
79
+ optional :termination_date, :message, 55, "Workstream.Protocol.Common.Date"
88
80
  optional :job_title, :string, 56
89
81
  optional :department_name, :string, 57
90
82
  end
@@ -93,16 +85,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
93
85
  optional :id, :int64, 2
94
86
  optional :created_at, :message, 3, "google.protobuf.Timestamp"
95
87
  optional :updated_at, :message, 4, "google.protobuf.Timestamp"
96
- optional :employee_id, :int64, 5
97
- optional :first_name, :string, 6
98
- optional :last_name, :string, 7
99
- end
100
- add_enum "Workstream.Protocol.Onboarding.MaritalStatus" do
101
- value :MARRIED, 0
102
- value :DIVORCED, 1
103
- value :WIDOWED, 2
104
- value :NEVER_MARRIED, 3
105
- value :SEPARATED, 4
88
+ optional :deleted_at, :message, 5, "google.protobuf.Timestamp"
89
+ optional :employee_uuid, :string, 6
90
+ optional :first_name, :string, 7
91
+ optional :last_name, :string, 8
106
92
  end
107
93
  end
108
94
  end
@@ -111,14 +97,11 @@ module Workstream
111
97
  module Protocol
112
98
  module Onboarding
113
99
  CompanyEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.CompanyEvent").msgclass
114
- CompanyEvent::CompanyStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.CompanyEvent.CompanyStatus").enummodule
115
100
  EmployeeEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.EmployeeEvent").msgclass
116
101
  CompanyStaffEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.CompanyStaffEvent").msgclass
117
- CompanyStaffEvent::CompanyStaffStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.CompanyStaffEvent.CompanyStaffStatus").enummodule
118
102
  EmergencyContact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.EmergencyContact").msgclass
119
103
  EmployeeInformationEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.EmployeeInformationEvent").msgclass
120
104
  EmployeeInitialStateEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.EmployeeInitialStateEvent").msgclass
121
- MaritalStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.MaritalStatus").enummodule
122
105
  end
123
106
  end
124
107
  end
@@ -0,0 +1,12 @@
1
+ module Workstream
2
+ module Protocol
3
+ module Common
4
+ class Date
5
+ def to_date
6
+ ::Date.new(year, month, day)
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
12
+
@@ -0,0 +1,10 @@
1
+ module Google
2
+ module Protobuf
3
+ class Timestamp
4
+ def to_datetime
5
+ micros = self.nanos / 10 ** 3
6
+ Time.at(seconds, micros)
7
+ end
8
+ end
9
+ end
10
+ end
@@ -1,3 +1,3 @@
1
1
  module WorkstreamProtocol
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workstream_protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Lv
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-18 00:00:00.000000000 Z
11
+ date: 2021-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -73,8 +73,11 @@ files:
73
73
  - lib/workstream_protocol.rb
74
74
  - lib/workstream_protocol/Common/Address_pb.rb
75
75
  - lib/workstream_protocol/Common/CountryCode_pb.rb
76
+ - lib/workstream_protocol/Common/Date_pb.rb
76
77
  - lib/workstream_protocol/Common/Phone_pb.rb
77
78
  - lib/workstream_protocol/Onboarding_pb.rb
79
+ - lib/workstream_protocol/utils/date.rb
80
+ - lib/workstream_protocol/utils/timestamp.rb
78
81
  - lib/workstream_protocol/version.rb
79
82
  - workstream_protocol.gemspec
80
83
  homepage: https://github.com/helloworld1812/Protocol/tree/master/packages/sdk-ruby/src/workstream_protocol