workstream_protocol 0.2.0 → 0.3.4

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: 6143dae96a990cae80bda19c7fa34f1a3e9ca52b2eb680995d76a614892dc67a
4
- data.tar.gz: 454665053c0fdfc595bae56355d396297cfee55ac2fd09d35af63e1552e78b8c
3
+ metadata.gz: f8ffaa0ed31f777f2e0715eebdbfcf61364382eab00432df2b691adec99bc57b
4
+ data.tar.gz: a5fe9fcf1a33c89d512db618fab16f6b1f9c491eb83306a8dab7a295ee452dab
5
5
  SHA512:
6
- metadata.gz: 1774cd7b1280742a70eb4ff35ab8c2cde210b0fb0511c604dd27d0c4041c4723983a25e134f72043a26f9af146021f8f7bb14650319f291a97922bec5b3fd97d
7
- data.tar.gz: 7f85e4ecc9f0aabf69ed4a3bcf6801b19c6a6103e372d2337186164991ad9cca7dc2186ae8fd341087963d526dc4eb7f0c26e0f443d985c050df8b80f61cf851
6
+ metadata.gz: 18ecf35cb2a39760accdddc4263f67f4981a38833f2b26a4e4674a3dec0a9679d476baf50901067bfa7d9f139beec8fd5bfc0a8f85dfc4a5ff1fed91e995e69e
7
+ data.tar.gz: 5258e3d036fe64015e06de5bb0ba6515d3b140143555e8a481947e6dc6db2af027151e0a6b0a1c869d5ed2861b40867b6e26151938255eaa581569918951002c
data/bin/console CHANGED
@@ -11,8 +11,8 @@ require "pry"
11
11
  # Pry.start
12
12
 
13
13
  # AWS stuffs
14
- require 'aws'
15
- require 'aws-sdk-sns'
14
+ # require 'aws'
15
+ # require 'aws-sdk-sns'
16
16
 
17
17
  require "irb"
18
18
  IRB.start(__FILE__)
@@ -1,4 +1,10 @@
1
- require 'workstream_protocol/Onboarding_pb'
1
+ protocols = File.expand_path("../workstream_protocol", __FILE__)
2
+ $LOAD_PATH.unshift(protocols) unless $LOAD_PATH.include?(protocols)
3
+
4
+ require 'Onboarding_pb'
5
+ require 'utils/timestamp'
6
+ require 'utils/date'
7
+
2
8
 
3
9
  module WorkstreamProtocol
4
10
 
@@ -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,43 +6,54 @@ 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
- add_message "Workstream.Protocol.Onboarding.CompanyEvent" do
12
- optional :uuid, :string, 1
13
- optional :id, :int64, 2
12
+ add_message "Workstream.Protocol.Onboarding.EmployeeOnboardingEvent" do
13
+ optional :id, :string, 1
14
14
  optional :created_at, :message, 3, "google.protobuf.Timestamp"
15
15
  optional :updated_at, :message, 4, "google.protobuf.Timestamp"
16
- optional :name, :string, 5
17
- optional :status, :enum, 6, "Workstream.Protocol.Onboarding.CompanyEvent.CompanyStatus"
16
+ optional :deleted_at, :message, 5, "google.protobuf.Timestamp"
17
+ optional :company_id, :string, 6
18
+ optional :employee_id, :string, 7
19
+ optional :app_name, :string, 8
20
+ optional :app_version, :string, 9
21
+ optional :configuration_id, :string, 10
18
22
  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
23
+ add_message "Workstream.Protocol.Onboarding.CompanyEvent" do
24
+ optional :id, :string, 1
25
+ optional :created_at, :message, 3, "google.protobuf.Timestamp"
26
+ optional :updated_at, :message, 4, "google.protobuf.Timestamp"
27
+ optional :deleted_at, :message, 5, "google.protobuf.Timestamp"
28
+ optional :name, :string, 6
29
+ optional :status, :string, 7
24
30
  end
25
31
  add_message "Workstream.Protocol.Onboarding.EmployeeEvent" do
26
- optional :uuid, :string, 1
27
- optional :id, :int64, 2
32
+ optional :id, :string, 1
28
33
  optional :created_at, :message, 3, "google.protobuf.Timestamp"
29
34
  optional :updated_at, :message, 4, "google.protobuf.Timestamp"
30
- optional :company_id, :int64, 5
35
+ optional :deleted_at, :message, 5, "google.protobuf.Timestamp"
36
+ optional :company_id, :string, 6
31
37
  end
32
38
  add_message "Workstream.Protocol.Onboarding.CompanyStaffEvent" do
33
- optional :uuid, :string, 1
34
- optional :id, :int64, 2
39
+ optional :id, :string, 1
35
40
  optional :created_at, :message, 3, "google.protobuf.Timestamp"
36
41
  optional :updated_at, :message, 4, "google.protobuf.Timestamp"
37
- optional :status, :enum, 5, "Workstream.Protocol.Onboarding.CompanyStaffEvent.CompanyStaffStatus"
38
- optional :company_id, :int64, 6
39
- optional :name, :string, 7
40
- optional :email, :string, 8
41
- optional :phone, :message, 9, "Workstream.Protocol.Common.Phone"
42
+ optional :deleted_at, :message, 5, "google.protobuf.Timestamp"
43
+ optional :company_id, :string, 6
44
+ optional :status, :string, 7
45
+ optional :name, :string, 8
46
+ optional :email, :string, 9
47
+ optional :phone, :message, 10, "Workstream.Protocol.Common.Phone"
42
48
  end
43
- add_enum "Workstream.Protocol.Onboarding.CompanyStaffEvent.CompanyStaffStatus" do
44
- value :ACTIVE, 0
45
- value :DISABLED, 1
49
+ add_message "Workstream.Protocol.Onboarding.CompanyRoleEvent" do
50
+ optional :id, :string, 1
51
+ optional :name, :string, 2
52
+ optional :status, :string, 3
53
+ optional :company_id, :string, 4
54
+ optional :created_at, :message, 5, "google.protobuf.Timestamp"
55
+ optional :updated_at, :message, 6, "google.protobuf.Timestamp"
56
+ optional :deleted_at, :message, 7, "google.protobuf.Timestamp"
46
57
  end
47
58
  add_message "Workstream.Protocol.Onboarding.EmergencyContact" do
48
59
  optional :relationship, :string, 1
@@ -54,25 +65,25 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
54
65
  optional :address, :message, 7, "Workstream.Protocol.Common.Address"
55
66
  end
56
67
  add_message "Workstream.Protocol.Onboarding.EmployeeInformationEvent" do
57
- optional :uuid, :string, 1
58
- optional :id, :int64, 2
68
+ optional :id, :string, 1
59
69
  optional :created_at, :message, 3, "google.protobuf.Timestamp"
60
70
  optional :updated_at, :message, 4, "google.protobuf.Timestamp"
61
- optional :company_id, :int64, 5
62
- optional :employee_id, :int64, 6
63
- optional :first_name, :string, 7
64
- optional :middle_name, :string, 8
65
- optional :last_name, :string, 9
66
- optional :prior_last_name, :string, 10
67
- optional :prefered_name, :string, 11
68
- optional :salutation, :string, 12
69
- optional :ethnicity, :string, 13
70
- optional :gender, :string, 14
71
- optional :marital_status, :enum, 15, "Workstream.Protocol.Onboarding.MaritalStatus"
72
- optional :ssn, :string, 16
73
- optional :smoker, :bool, 17
74
- optional :nationality, :string, 18
75
- optional :date_of_birth, :string, 19
71
+ optional :deleted_at, :message, 5, "google.protobuf.Timestamp"
72
+ optional :employee_id, :string, 8
73
+ optional :first_name, :string, 11
74
+ optional :middle_name, :string, 12
75
+ optional :last_name, :string, 13
76
+ optional :prior_last_name, :string, 14
77
+ optional :preferred_name, :string, 15
78
+ optional :salutation, :string, 16
79
+ optional :ethnicity, :string, 17
80
+ optional :gender, :string, 18
81
+ optional :marital_status, :string, 19
82
+ optional :ssn, :string, 20
83
+ optional :smoker, :bool, 21
84
+ optional :nationality, :string, 22
85
+ optional :date_of_birth, :message, 23, "Workstream.Protocol.Common.Date"
86
+ optional :middle_initial, :string, 24
76
87
  optional :home_email, :string, 31
77
88
  optional :home_phone, :message, 32, "Workstream.Protocol.Common.Phone"
78
89
  optional :home_address, :message, 33, "Workstream.Protocol.Common.Address"
@@ -81,28 +92,21 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
81
92
  optional :work_phone, :message, 43, "Workstream.Protocol.Common.Phone"
82
93
  optional :work_address, :message, 44, "Workstream.Protocol.Common.Address"
83
94
  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
95
+ optional :apply_date, :message, 52, "Workstream.Protocol.Common.Date"
96
+ optional :hire_date, :message, 53, "Workstream.Protocol.Common.Date"
97
+ optional :start_date, :message, 54, "Workstream.Protocol.Common.Date"
98
+ optional :termination_date, :message, 55, "Workstream.Protocol.Common.Date"
88
99
  optional :job_title, :string, 56
89
100
  optional :department_name, :string, 57
90
101
  end
91
102
  add_message "Workstream.Protocol.Onboarding.EmployeeInitialStateEvent" do
92
- optional :uuid, :string, 1
93
- optional :id, :int64, 2
103
+ optional :id, :string, 1
94
104
  optional :created_at, :message, 3, "google.protobuf.Timestamp"
95
105
  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
106
+ optional :deleted_at, :message, 5, "google.protobuf.Timestamp"
107
+ optional :employee_id, :string, 6
108
+ optional :first_name, :string, 7
109
+ optional :last_name, :string, 8
106
110
  end
107
111
  end
108
112
  end
@@ -110,15 +114,14 @@ end
110
114
  module Workstream
111
115
  module Protocol
112
116
  module Onboarding
117
+ EmployeeOnboardingEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.EmployeeOnboardingEvent").msgclass
113
118
  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
119
  EmployeeEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.EmployeeEvent").msgclass
116
120
  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
121
+ CompanyRoleEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.CompanyRoleEvent").msgclass
118
122
  EmergencyContact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.EmergencyContact").msgclass
119
123
  EmployeeInformationEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Workstream.Protocol.Onboarding.EmployeeInformationEvent").msgclass
120
124
  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
125
  end
123
126
  end
124
127
  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.0"
2
+ VERSION = "0.3.4"
3
3
  end
@@ -1,11 +1,10 @@
1
- lib = File.expand_path("../lib", __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
1
+ # lib = File.expand_path("../lib", __FILE__)
2
+ # $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
- protocols = File.expand_path("../lib/workstream_protocol", __FILE__)
5
- $LOAD_PATH.unshift(protocols) unless $LOAD_PATH.include?(protocols)
6
4
 
7
- require "workstream_protocol/version"
5
+ # require "workstream_protocol/version"
8
6
 
7
+ require_relative "lib/workstream_protocol/version"
9
8
  Gem::Specification.new do |spec|
10
9
  spec.name = "workstream_protocol"
11
10
  spec.version = WorkstreamProtocol::VERSION
@@ -35,6 +34,7 @@ Gem::Specification.new do |spec|
35
34
 
36
35
  spec.add_dependency 'google-protobuf'
37
36
  spec.add_development_dependency "pry"
38
- spec.add_development_dependency "aws"
39
- spec.add_development_dependency "aws-sdk-sns"
37
+ # spec.add_development_dependency "aws"
38
+ # spec.add_development_dependency "aws-sdk-sns"
39
+ spec.add_development_dependency 'gem-release'
40
40
  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.0
4
+ version: 0.3.4
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-17 00:00:00.000000000 Z
11
+ date: 2021-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -39,21 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: aws
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: aws-sdk-sns
42
+ name: gem-release
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - ">="
@@ -87,8 +73,11 @@ files:
87
73
  - lib/workstream_protocol.rb
88
74
  - lib/workstream_protocol/Common/Address_pb.rb
89
75
  - lib/workstream_protocol/Common/CountryCode_pb.rb
76
+ - lib/workstream_protocol/Common/Date_pb.rb
90
77
  - lib/workstream_protocol/Common/Phone_pb.rb
91
78
  - lib/workstream_protocol/Onboarding_pb.rb
79
+ - lib/workstream_protocol/utils/date.rb
80
+ - lib/workstream_protocol/utils/timestamp.rb
92
81
  - lib/workstream_protocol/version.rb
93
82
  - workstream_protocol.gemspec
94
83
  homepage: https://github.com/helloworld1812/Protocol/tree/master/packages/sdk-ruby/src/workstream_protocol